home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 85 / CD Actual 85 Febrero 2004.iso / Experto / Apache / apache_2.0.48-win32-x86-no_ssl.msi / Data.Cab / F252426_core.html.en < prev    next >
Encoding:
Extensible Markup Language  |  2003-10-13  |  170.8 KB  |  3,157 lines

  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
  4.         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  5.               This file is generated from xml source: DO NOT EDIT
  6.         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  7.       -->
  8. <title>core - Apache HTTP Server</title>
  9. <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
  10. <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
  11. <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
  12. <link href="../images/favicon.ico" rel="shortcut icon" /></head>
  13. <body>
  14. <div id="page-header">
  15. <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
  16. <p class="apache">Apache HTTP Server Version 2.0</p>
  17. <img alt="" src="../images/feather.gif" /></div>
  18. <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
  19. <div id="path">
  20. <a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs-project/">Documentation</a> > <a href="../">Version 2.0</a> > <a href="./">Modules</a></div>
  21. <div id="page-content">
  22. <div id="preamble"><h1>Apache Core Features</h1>
  23. <div class="toplang">
  24. <p><span>Available Languages: </span><a href="../de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> |
  25. <a href="../en/mod/core.html" title="English"> en </a></p>
  26. </div>
  27. <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Core Apache HTTP Server features that are always
  28. available</td></tr>
  29. <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Core</td></tr></table>
  30. </div>
  31. <div id="quickview"><h3 class="directives">Directives</h3>
  32. <ul id="toc">
  33. <li><img alt="" src="../images/down.gif" /> <a href="#acceptpathinfo">AcceptPathInfo</a></li>
  34. <li><img alt="" src="../images/down.gif" /> <a href="#accessfilename">AccessFileName</a></li>
  35. <li><img alt="" src="../images/down.gif" /> <a href="#adddefaultcharset">AddDefaultCharset</a></li>
  36. <li><img alt="" src="../images/down.gif" /> <a href="#addoutputfilterbytype">AddOutputFilterByType</a></li>
  37. <li><img alt="" src="../images/down.gif" /> <a href="#allowencodedslashes">AllowEncodedSlashes</a></li>
  38. <li><img alt="" src="../images/down.gif" /> <a href="#allowoverride">AllowOverride</a></li>
  39. <li><img alt="" src="../images/down.gif" /> <a href="#authname">AuthName</a></li>
  40. <li><img alt="" src="../images/down.gif" /> <a href="#authtype">AuthType</a></li>
  41. <li><img alt="" src="../images/down.gif" /> <a href="#cgimapextension">CGIMapExtension</a></li>
  42. <li><img alt="" src="../images/down.gif" /> <a href="#contentdigest">ContentDigest</a></li>
  43. <li><img alt="" src="../images/down.gif" /> <a href="#defaulttype">DefaultType</a></li>
  44. <li><img alt="" src="../images/down.gif" /> <a href="#directory"><Directory></a></li>
  45. <li><img alt="" src="../images/down.gif" /> <a href="#directorymatch"><DirectoryMatch></a></li>
  46. <li><img alt="" src="../images/down.gif" /> <a href="#documentroot">DocumentRoot</a></li>
  47. <li><img alt="" src="../images/down.gif" /> <a href="#enablemmap">EnableMMAP</a></li>
  48. <li><img alt="" src="../images/down.gif" /> <a href="#enablesendfile">EnableSendfile</a></li>
  49. <li><img alt="" src="../images/down.gif" /> <a href="#errordocument">ErrorDocument</a></li>
  50. <li><img alt="" src="../images/down.gif" /> <a href="#errorlog">ErrorLog</a></li>
  51. <li><img alt="" src="../images/down.gif" /> <a href="#fileetag">FileETag</a></li>
  52. <li><img alt="" src="../images/down.gif" /> <a href="#files"><Files></a></li>
  53. <li><img alt="" src="../images/down.gif" /> <a href="#filesmatch"><FilesMatch></a></li>
  54. <li><img alt="" src="../images/down.gif" /> <a href="#forcetype">ForceType</a></li>
  55. <li><img alt="" src="../images/down.gif" /> <a href="#hostnamelookups">HostnameLookups</a></li>
  56. <li><img alt="" src="../images/down.gif" /> <a href="#identitycheck">IdentityCheck</a></li>
  57. <li><img alt="" src="../images/down.gif" /> <a href="#ifdefine"><IfDefine></a></li>
  58. <li><img alt="" src="../images/down.gif" /> <a href="#ifmodule"><IfModule></a></li>
  59. <li><img alt="" src="../images/down.gif" /> <a href="#include">Include</a></li>
  60. <li><img alt="" src="../images/down.gif" /> <a href="#keepalive">KeepAlive</a></li>
  61. <li><img alt="" src="../images/down.gif" /> <a href="#keepalivetimeout">KeepAliveTimeout</a></li>
  62. <li><img alt="" src="../images/down.gif" /> <a href="#limit"><Limit></a></li>
  63. <li><img alt="" src="../images/down.gif" /> <a href="#limitexcept"><LimitExcept></a></li>
  64. <li><img alt="" src="../images/down.gif" /> <a href="#limitinternalrecursion">LimitInternalRecursion</a></li>
  65. <li><img alt="" src="../images/down.gif" /> <a href="#limitrequestbody">LimitRequestBody</a></li>
  66. <li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfields">LimitRequestFields</a></li>
  67. <li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfieldsize">LimitRequestFieldSize</a></li>
  68. <li><img alt="" src="../images/down.gif" /> <a href="#limitrequestline">LimitRequestLine</a></li>
  69. <li><img alt="" src="../images/down.gif" /> <a href="#limitxmlrequestbody">LimitXMLRequestBody</a></li>
  70. <li><img alt="" src="../images/down.gif" /> <a href="#location"><Location></a></li>
  71. <li><img alt="" src="../images/down.gif" /> <a href="#locationmatch"><LocationMatch></a></li>
  72. <li><img alt="" src="../images/down.gif" /> <a href="#loglevel">LogLevel</a></li>
  73. <li><img alt="" src="../images/down.gif" /> <a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></li>
  74. <li><img alt="" src="../images/down.gif" /> <a href="#namevirtualhost">NameVirtualHost</a></li>
  75. <li><img alt="" src="../images/down.gif" /> <a href="#options">Options</a></li>
  76. <li><img alt="" src="../images/down.gif" /> <a href="#require">Require</a></li>
  77. <li><img alt="" src="../images/down.gif" /> <a href="#rlimitcpu">RLimitCPU</a></li>
  78. <li><img alt="" src="../images/down.gif" /> <a href="#rlimitmem">RLimitMEM</a></li>
  79. <li><img alt="" src="../images/down.gif" /> <a href="#rlimitnproc">RLimitNPROC</a></li>
  80. <li><img alt="" src="../images/down.gif" /> <a href="#satisfy">Satisfy</a></li>
  81. <li><img alt="" src="../images/down.gif" /> <a href="#scriptinterpretersource">ScriptInterpreterSource</a></li>
  82. <li><img alt="" src="../images/down.gif" /> <a href="#serveradmin">ServerAdmin</a></li>
  83. <li><img alt="" src="../images/down.gif" /> <a href="#serveralias">ServerAlias</a></li>
  84. <li><img alt="" src="../images/down.gif" /> <a href="#servername">ServerName</a></li>
  85. <li><img alt="" src="../images/down.gif" /> <a href="#serverpath">ServerPath</a></li>
  86. <li><img alt="" src="../images/down.gif" /> <a href="#serverroot">ServerRoot</a></li>
  87. <li><img alt="" src="../images/down.gif" /> <a href="#serversignature">ServerSignature</a></li>
  88. <li><img alt="" src="../images/down.gif" /> <a href="#servertokens">ServerTokens</a></li>
  89. <li><img alt="" src="../images/down.gif" /> <a href="#sethandler">SetHandler</a></li>
  90. <li><img alt="" src="../images/down.gif" /> <a href="#setinputfilter">SetInputFilter</a></li>
  91. <li><img alt="" src="../images/down.gif" /> <a href="#setoutputfilter">SetOutputFilter</a></li>
  92. <li><img alt="" src="../images/down.gif" /> <a href="#timeout">TimeOut</a></li>
  93. <li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalname">UseCanonicalName</a></li>
  94. <li><img alt="" src="../images/down.gif" /> <a href="#virtualhost"><VirtualHost></a></li>
  95. </ul>
  96. </div>
  97.  
  98. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  99. <div class="directive-section"><h2><a name="AcceptPathInfo" id="AcceptPathInfo">AcceptPathInfo</a> <a name="acceptpathinfo" id="acceptpathinfo">Directive</a></h2>
  100. <table class="directive">
  101. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Resources accept trailing pathname information</td></tr>
  102. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AcceptPathInfo On|Off|Default</code></td></tr>
  103. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AcceptPathInfo Default</code></td></tr>
  104. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  105. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
  106. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  107. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  108. <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0.30 and later</td></tr>
  109. </table>
  110.  
  111.     <p>This directive controls whether requests that contain trailing
  112.     pathname information that follows an actual filename (or
  113.     non-existent file in an existing directory) will be accepted or
  114.     rejected.  The trailing pathname information can be made
  115.     available to scripts in the <code>PATH_INFO</code> environment
  116.     variable.</p>
  117.  
  118.     <p>For example, assume the location <code>/test/</code> points to
  119.     a directory that contains only the single file
  120.     <code>here.html</code>.  Then requests for
  121.     <code>/test/here.html/more</code> and
  122.     <code>/test/nothere.html/more</code> both collect
  123.     <code>/more</code> as <code>PATH_INFO</code>.</p>
  124.  
  125.     <p>The three possible arguments for the
  126.     <code class="directive">AcceptPathInfo</code> directive are:</p>
  127.     <dl>
  128.     <dt><code>Off</code></dt><dd>A request will only be accepted if it
  129.     maps to a literal path that exists.  Therefore a request with
  130.     trailing pathname information after the true filename such as
  131.     <code>/test/here.html/more</code> in the above example will return
  132.     a 404 NOT FOUND error.</dd>
  133.  
  134.     <dt><code>On</code></dt><dd>A request will be accepted if a
  135.     leading path component maps to a file that exists.  The above
  136.     example <code>/test/here.html/more</code> will be accepted if
  137.     <code>/test/here.html</code> maps to a valid file.</dd>
  138.  
  139.     <dt><code>Default</code></dt><dd>The treatment of requests with
  140.     trailing pathname information is determined by the <a href="../handler.html">handler</a> responsible for the request.
  141.     The core handler for normal files defaults to rejecting
  142.     <code>PATH_INFO</code> requests. Handlers that serve scripts, such as <a href="mod_cgi.html">cgi-script</a> and <a href="mod_isapi.html">isapi-isa</a>, generally accept
  143.     <code>PATH_INFO</code> by default.</dd>
  144.     </dl>
  145.  
  146.     <p>The primary purpose of the <code>AcceptPathInfo</code>
  147.     directive is to allow you to override the handler's choice of
  148.     accepting or rejecting <code>PATH_INFO</code>. This override is required,
  149.     for example, when you use a <a href="../filter.html">filter</a>, such
  150.     as <a href="mod_include.html">INCLUDES</a>, to generate content
  151.     based on <code>PATH_INFO</code>.  The core handler would usually reject
  152.     the request, so you can use the following configuration to enable
  153.     such a script:</p>
  154.  
  155.     <div class="example"><p><code>
  156.       <Files "mypaths.shtml"><br />
  157.       <span class="indent">
  158.         Options +Includes<br />
  159.         SetOutputFilter INCLUDES<br />
  160.         AcceptPathInfo On<br />
  161.       </span>
  162.       </Files>
  163.     </code></p></div>
  164.  
  165.  
  166. </div>
  167. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  168. <div class="directive-section"><h2><a name="AccessFileName" id="AccessFileName">AccessFileName</a> <a name="accessfilename" id="accessfilename">Directive</a></h2>
  169. <table class="directive">
  170. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the distributed configuration file</td></tr>
  171. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AccessFileName <var>filename</var> [<var>filename</var>] ...</code></td></tr>
  172. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AccessFileName .htaccess</code></td></tr>
  173. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  174. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  175. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  176. </table>
  177.     <p>While processing a request the server looks for
  178.     the first existing configuration file from this list of names in
  179.     every directory of the path to the document, if distributed
  180.     configuration files are <a href="#allowoverride">enabled for that
  181.     directory</a>. For example:</p>
  182.  
  183.     <div class="example"><p><code>
  184.       AccessFileName .acl
  185.     </code></p></div>
  186.  
  187.     <p>before returning the document
  188.     <code>/usr/local/web/index.html</code>, the server will read
  189.     <code>/.acl</code>, <code>/usr/.acl</code>,
  190.     <code>/usr/local/.acl</code> and <code>/usr/local/web/.acl</code>
  191.     for directives, unless they have been disabled with</p>
  192.  
  193.     <div class="example"><p><code>
  194.       <Directory /><br />
  195.       <span class="indent">
  196.         AllowOverride None<br />
  197.       </span>
  198.       </Directory>
  199.     </code></p></div>
  200.  
  201. <h3>See also</h3>
  202. <ul>
  203. <li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li>
  204. <li><a href="../configuring.html">Configuration Files</a></li>
  205. <li><a href="../howto/htaccess.html">.htaccess Files</a></li>
  206. </ul>
  207. </div>
  208. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  209. <div class="directive-section"><h2><a name="AddDefaultCharset" id="AddDefaultCharset">AddDefaultCharset</a> <a name="adddefaultcharset" id="adddefaultcharset">Directive</a></h2>
  210. <table class="directive">
  211. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Default character set to be added for a
  212. response without an explicit character set</td></tr>
  213. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddDefaultCharset On|Off|<var>charset</var></code></td></tr>
  214. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AddDefaultCharset Off</code></td></tr>
  215. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  216. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
  217. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  218. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  219. </table>
  220.     <p>This directive specifies the name of the character set that
  221.     will be added to any response that does not have any parameter on
  222.     the content type in the HTTP headers. This will override any
  223.     character set specified in the body of the document via a
  224.     <code>META</code> tag. A setting of <code>AddDefaultCharset
  225.     Off</code> disables this
  226.     functionality. <code>AddDefaultCharset On</code> enables
  227.     Apache's internal default charset of <code>iso-8859-1</code> as
  228.     required by the directive. You can also specify an alternate
  229.     <var>charset</var> to be used. For example:</p>
  230.  
  231.     <div class="example"><p><code>
  232.       AddDefaultCharset utf-8
  233.     </code></p></div>
  234.  
  235. </div>
  236. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  237. <div class="directive-section"><h2><a name="AddOutputFilterByType" id="AddOutputFilterByType">AddOutputFilterByType</a> <a name="addoutputfilterbytype" id="addoutputfilterbytype">Directive</a></h2>
  238. <table class="directive">
  239. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>assigns an output filter to a particular MIME-type</td></tr>
  240. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddOutputFilterByType <var>filter</var>[;<var>filter</var>...]
  241. <var>MIME-type</var> [<var>MIME-type</var>] ...</code></td></tr>
  242. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  243. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
  244. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  245. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  246. <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0.33 and later</td></tr>
  247. </table>
  248.     <p>This directive activates a particular output <a href="../filter.html">filter</a> for a request depending on the
  249.     response MIME-type.</p>
  250.  
  251.     <p>The following example uses the <code>DEFLATE</code> filter, which
  252.     is provided by <code class="module"><a href="../mod/mod_deflate.html">mod_deflate</a></code>. It will compress all
  253.     output (either static or dynamic) which is labeled as
  254.     <code>text/html</code> or <code>text/plain</code> before it is sent
  255.     to the client.</p>
  256.  
  257.     <div class="example"><p><code>
  258.       AddOutputFilterByType DEFLATE text/html text/plain
  259.     </code></p></div>
  260.  
  261.     <p>If you want the content to be processed by more than one filter, their
  262.     names have to be separated by semicolons. It's also possible to use one
  263.     <code class="directive">AddOutputFilterByType</code> directive for each of
  264.     these filters.</p>
  265.  
  266.     <p>The configuration below causes all script output labeled as
  267.     <code>text/html</code> to be processed at first by the
  268.     <code>INCLUDES</code> filter and then by the <code>DEFLATE</code>
  269.     filter.</p>
  270.  
  271.     <div class="example"><p><code>
  272.     <Location /cgi-bin/><br />
  273.     <span class="indent">
  274.       Options Includes<br />
  275.       AddOutputFilterByType INCLUDES;DEFLATE text/html<br />
  276.     </span>
  277.     </Location>
  278.     </code></p></div>
  279.  
  280.     <div class="warning"><h3>Note</h3>
  281.       <p>Enabling filters with <code class="directive">AddOutputFilterByType</code>
  282.       may fail partially or completely in some cases. For expample, no
  283.       filters are applied if the MIME-type could not be determined  and falls
  284.       back to the <code class="directive"><a href="#defaulttype">DefaultType</a></code> setting,
  285.       even if the <code class="directive"><a href="#defaulttype">DefaultType</a></code> is the
  286.       same.</p>
  287.  
  288.       <p>However, if you want to make sure, that the filters will be
  289.       applied, assign the content type to a resource explicitely, for
  290.       example with <code class="directive"><a href="../mod/mod_mime.html#addtype">AddType</a></code> or
  291.       <code class="directive"><a href="#forcetype">ForceType</a></code>. Setting the
  292.       content type within a (non-nph) CGI script is also safe.</p>
  293.  
  294.       <p>The by-type output filters are never applied on proxy requests.</p>
  295.     </div>
  296.  
  297. <h3>See also</h3>
  298. <ul>
  299. <li><code class="directive"><a href="../mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code></li>
  300. <li><code class="directive"><a href="#setoutputfilter">SetOutputFilter</a></code></li>
  301. <li><a href="../filter.html">filters</a></li>
  302. </ul>
  303. </div>
  304. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  305. <div class="directive-section"><h2><a name="AllowEncodedSlashes" id="AllowEncodedSlashes">AllowEncodedSlashes</a> <a name="allowencodedslashes" id="allowencodedslashes">Directive</a></h2>
  306. <table class="directive">
  307. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines whether encoded path separators in URLs are allowed to
  308. be passed through</td></tr>
  309. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowEncodedSlashes On|Off</code></td></tr>
  310. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowEncodedSlashes Off</code></td></tr>
  311. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  312. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  313. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  314. <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0.46 and later</td></tr>
  315. </table>
  316.     <p>The <code class="directive">AllowEncodedSlashes</code> directive allows URLs
  317.     which contain encoded path separators (<code>%2F</code> for <code>/</code>
  318.     and additionally <code>%5C</code> for <code>\</code> on according systems)
  319.     to be used. Normally such URLs are refused with a 404 (Not found) error.</p>
  320.  
  321.     <p>Turning <code class="directive">AllowEncodedSlashes</code> <code>On</code> is
  322.     mostly useful when used in conjunction with <code>PATH_INFO</code>.</p>
  323.  
  324.     <div class="note"><h3>Note</h3>
  325.       <p>Allowing encoded slashes does <em>not</em> imply <em>decoding</em>.
  326.       Occurences of <code>%2F</code> or <code>%5C</code> (<em>only</em> on
  327.       according systems) will be left as such in the otherwise decoded URL
  328.       string.</p>
  329.     </div>
  330.  
  331. <h3>See also</h3>
  332. <ul>
  333. <li><code class="directive"><a href="#acceptpathinfo">AcceptPathInfo</a></code></li>
  334. </ul>
  335. </div>
  336. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  337. <div class="directive-section"><h2><a name="AllowOverride" id="AllowOverride">AllowOverride</a> <a name="allowoverride" id="allowoverride">Directive</a></h2>
  338. <table class="directive">
  339. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Types of directives that are allowed in
  340. .htaccess files</td></tr>
  341. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowOverride All|None|<var>directive-type</var>
  342. [<var>directive-type</var>] ...</code></td></tr>
  343. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowOverride All</code></td></tr>
  344. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
  345. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  346. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  347. </table>
  348.     <p>When the server finds an <code>.htaccess</code> file (as
  349.     specified by <code class="directive"><a href="#accessfilename">AccessFileName</a></code>)
  350.     it needs to know which directives declared in that file can override
  351.     earlier configuration directives.</p>
  352.  
  353.     <div class="note"><h3>Only available in <Directory> sections</h3>
  354.     <code class="directive">AllowOverride</code> is valid only in
  355.     <code class="directive"><a href="#directory"><Directory></a></code>
  356.     sections, not in <code class="directive"><a href="#location"><Location></a></code> or <code class="directive"><a href="#files"><Files></a></code> sections.
  357.     </div>
  358.  
  359.     <p>When this directive is set to <code>None</code>, then
  360.     <a href="#accessfilename">.htaccess</a> files are completely ignored.
  361.     In this case, the server will not even attempt to read
  362.     <code>.htaccess</code> files in the filesystem.</p>
  363.  
  364.     <p>When this directive is set to <code>All</code>, then any
  365.     directive which has the .htaccess <a href="directive-dict.html#Context">Context</a> is allowed in
  366.     <code>.htaccess</code> files.</p>
  367.  
  368.     <p>The <var>directive-type</var> can be one of the following
  369.     groupings of directives.</p>
  370.  
  371.     <dl>
  372.       <dt>AuthConfig</dt>
  373.  
  374.       <dd>
  375.  
  376.       Allow use of the authorization directives (<code class="directive"><a href="../mod/mod_auth_dbm.html#authdbmgroupfile">AuthDBMGroupFile</a></code>,
  377.       <code class="directive"><a href="../mod/mod_auth_dbm.html#authdbmuserfile">AuthDBMUserFile</a></code>,
  378.       <code class="directive"><a href="../mod/mod_auth.html#authgroupfile">AuthGroupFile</a></code>,
  379.       <code class="directive"><a href="#authname">AuthName</a></code>,
  380.       <code class="directive"><a href="#authtype">AuthType</a></code>, <code class="directive"><a href="../mod/mod_auth.html#authuserfile">AuthUserFile</a></code>, <code class="directive"><a href="#require">Require</a></code>, <em>etc.</em>).</dd>
  381.  
  382.       <dt>FileInfo</dt>
  383.  
  384.       <dd>
  385.       Allow use of the directives controlling document types (<code class="directive"><a href="#defaulttype">DefaultType</a></code>, <code class="directive"><a href="#errordocument">ErrorDocument</a></code>, <code class="directive"><a href="#forcetype">ForceType</a></code>, <code class="directive"><a href="../mod/mod_negotiation.html#languagepriority">LanguagePriority</a></code>,
  386.       <code class="directive"><a href="#sethandler">SetHandler</a></code>, <code class="directive"><a href="#setinputfilter">SetInputFilter</a></code>, <code class="directive"><a href="#setoutputfilter">SetOutputFilter</a></code>, and
  387.       <code class="module"><a href="../mod/mod_mime.html">mod_mime</a></code> Add* and Remove*
  388.       directives, <em>etc.</em>).</dd>
  389.  
  390.       <dt>Indexes</dt>
  391.  
  392.       <dd>
  393.       Allow use of the directives controlling directory indexing
  394.       (<code class="directive"><a href="../mod/mod_autoindex.html#adddescription">AddDescription</a></code>,
  395.       <code class="directive"><a href="../mod/mod_autoindex.html#addicon">AddIcon</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#addiconbyencoding">AddIconByEncoding</a></code>,
  396.       <code class="directive"><a href="../mod/mod_autoindex.html#addiconbytype">AddIconByType</a></code>,
  397.       <code class="directive"><a href="../mod/mod_autoindex.html#defaulticon">DefaultIcon</a></code>, <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#fancyindexing">FancyIndexing</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#headername">HeaderName</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#indexignore">IndexIgnore</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#indexoptions">IndexOptions</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#readmename">ReadmeName</a></code>,
  398.       <em>etc.</em>).</dd>
  399.  
  400.       <dt>Limit</dt>
  401.  
  402.       <dd>
  403.       Allow use of the directives controlling host access (<code class="directive"><a href="../mod/mod_access.html#allow">Allow</a></code>, <code class="directive"><a href="../mod/mod_access.html#deny">Deny</a></code> and <code class="directive"><a href="../mod/mod_access.html#order">Order</a></code>).</dd>
  404.  
  405.       <dt>Options</dt>
  406.  
  407.       <dd>
  408.       Allow use of the directives controlling specific directory
  409.       features (<code class="directive"><a href="#options">Options</a></code> and
  410.       <code class="directive"><a href="../mod/mod_include.html#xbithack">XBitHack</a></code>).</dd>
  411.     </dl>
  412.  
  413.     <p>Example:</p>
  414.  
  415.     <div class="example"><p><code>
  416.       AllowOverride AuthConfig Indexes
  417.     </code></p></div>
  418.  
  419. <h3>See also</h3>
  420. <ul>
  421. <li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li>
  422. <li><a href="../configuring.html">Configuration Files</a></li>
  423. <li><a href="../howto/htaccess.html">.htaccess Files</a></li>
  424. </ul>
  425. </div>
  426. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  427. <div class="directive-section"><h2><a name="AuthName" id="AuthName">AuthName</a> <a name="authname" id="authname">Directive</a></h2>
  428. <table class="directive">
  429. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Authorization realm for use in HTTP
  430. authentication</td></tr>
  431. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthName <var>auth-domain</var></code></td></tr>
  432. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
  433. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
  434. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  435. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  436. </table>
  437.     <p>This directive sets the name of the authorization realm for a
  438.     directory. This realm is given to the client so that the user
  439.     knows which username and password to send.
  440.     <code class="directive">AuthName</code> takes a single argument; if the
  441.     realm name contains spaces, it must be enclosed in quotation
  442.     marks.  It must be accompanied by <code class="directive"><a href="#authtype">AuthType</a></code> and <code class="directive"><a href="#require">Require</a></code> directives, and directives such
  443.     as <code class="directive"><a href="../mod/mod_auth.html#authuserfile">AuthUserFile</a></code> and
  444.     <code class="directive"><a href="../mod/mod_auth.html#authgroupfile">AuthGroupFile</a></code> to
  445.     work.</p>
  446.  
  447.    <p>For example:</p>
  448.  
  449.    <div class="example"><p><code>
  450.      AuthName "Top Secret"
  451.    </code></p></div>
  452.  
  453.     <p>The string provided for the <code>AuthName</code> is what will
  454.     appear in the password dialog provided by most browsers.</p>
  455.  
  456. <h3>See also</h3>
  457. <ul>
  458. <li><a href="../howto/auth.html">Authentication, Authorization, and
  459.     Access Control</a></li>
  460. </ul>
  461. </div>
  462. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  463. <div class="directive-section"><h2><a name="AuthType" id="AuthType">AuthType</a> <a name="authtype" id="authtype">Directive</a></h2>
  464. <table class="directive">
  465. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Type of user authentication</td></tr>
  466. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AuthType Basic|Digest</code></td></tr>
  467. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
  468. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
  469. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  470. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  471. </table>
  472.     <p>This directive selects the type of user authentication for a
  473.     directory. Only <code>Basic</code> and <code>Digest</code> are
  474.     currently implemented.
  475.  
  476.      It must be accompanied by <code class="directive"><a href="#authname">AuthName</a></code> and <code class="directive"><a href="#require">Require</a></code> directives, and directives such
  477.      as <code class="directive"><a href="../mod/mod_auth.html#authuserfile">AuthUserFile</a></code> and
  478.      <code class="directive"><a href="../mod/mod_auth.html#authgroupfile">AuthGroupFile</a></code> to
  479.      work.</p>
  480.  
  481. <h3>See also</h3>
  482. <ul>
  483. <li><a href="../howto/auth.html">Authentication, Authorization,
  484. and Access Control</a></li>
  485. </ul>
  486. </div>
  487. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  488. <div class="directive-section"><h2><a name="CGIMapExtension" id="CGIMapExtension">CGIMapExtension</a> <a name="cgimapextension" id="cgimapextension">Directive</a></h2>
  489. <table class="directive">
  490. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Technique for locating the interpreter for CGI
  491. scripts</td></tr>
  492. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CGIMapExtension <var>cgi-path</var> <var>.extension</var></code></td></tr>
  493. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
  494. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
  495. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  496. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  497. <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>NetWare only</td></tr>
  498. </table>
  499.     <p>This directive is used to control how Apache finds the
  500.     interpreter used to run CGI scripts. For example, setting
  501.     <code>CGIMapExtension sys:\foo.nlm .foo</code> will
  502.     cause all CGI script files with a <code>.foo</code> extension to
  503.     be passed to the FOO interpreter.</p>
  504.  
  505. </div>
  506. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  507. <div class="directive-section"><h2><a name="ContentDigest" id="ContentDigest">ContentDigest</a> <a name="contentdigest" id="contentdigest">Directive</a></h2>
  508. <table class="directive">
  509. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables the generation of Content-MD5 HTTP Response
  510. headers</td></tr>
  511. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ContentDigest On|Off</code></td></tr>
  512. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ContentDigest Off</code></td></tr>
  513. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  514. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
  515. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  516. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  517. </table>
  518.     <p>This directive enables the generation of
  519.     <code>Content-MD5</code> headers as defined in RFC1864
  520.     respectively RFC2068.</p>
  521.  
  522.     <p>MD5 is an algorithm for computing a "message digest"
  523.     (sometimes called "fingerprint") of arbitrary-length data, with
  524.     a high degree of confidence that any alterations in the data
  525.     will be reflected in alterations in the message digest.</p>
  526.  
  527.     <p>The <code>Content-MD5</code> header provides an end-to-end
  528.     message integrity check (MIC) of the entity-body. A proxy or
  529.     client may check this header for detecting accidental
  530.     modification of the entity-body in transit. Example header:</p>
  531.  
  532.     <div class="example"><p><code>
  533.       Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==
  534.     </code></p></div>
  535.  
  536.     <p>Note that this can cause performance problems on your server
  537.     since the message digest is computed on every request (the
  538.     values are not cached).</p>
  539.  
  540.     <p><code>Content-MD5</code> is only sent for documents served
  541.     by the <code class="module"><a href="../mod/core.html">core</a></code>, and not by any module. For example,
  542.     SSI documents, output from CGI scripts, and byte range responses
  543.     do not have this header.</p>
  544.  
  545. </div>
  546. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  547. <div class="directive-section"><h2><a name="DefaultType" id="DefaultType">DefaultType</a> <a name="defaulttype" id="defaulttype">Directive</a></h2>
  548. <table class="directive">
  549. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>MIME content-type that will be sent if the
  550. server cannot determine a type in any other way</td></tr>
  551. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DefaultType <var>MIME-type</var></code></td></tr>
  552. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DefaultType text/plain</code></td></tr>
  553. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  554. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
  555. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  556. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  557. </table>
  558.     <p>There will be times when the server is asked to provide a
  559.     document whose type cannot be determined by its MIME types
  560.     mappings.</p>
  561.  
  562.     <p>The server must inform the client of the content-type of the
  563.     document, so in the event of an unknown type it uses the
  564.     <code>DefaultType</code>. For example:</p>
  565.  
  566.     <div class="example"><p><code>
  567.       DefaultType image/gif
  568.     </code></p></div>
  569.  
  570.     <p>would be appropriate for a directory which contained many GIF
  571.     images with filenames missing the <code>.gif</code> extension.</p>
  572.  
  573.     <p>Note that unlike <code class="directive"><a href="#forcetype">ForceType</a></code>, this directive only
  574.     provides the default mime-type. All other mime-type definitions,
  575.     including filename extensions, that might identify the media type
  576.     will override this default.</p>
  577.  
  578. </div>
  579. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  580. <div class="directive-section"><h2><a name="Directory" id="Directory"><Directory></a> <a name="directory" id="directory">Directive</a></h2>
  581. <table class="directive">
  582. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enclose a group of directives that apply only to the
  583. named file-system directory and sub-directories</td></tr>
  584. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Directory <var>directory-path</var>>
  585. ... </Directory></code></td></tr>
  586. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  587. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  588. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  589. </table>
  590.     <p><code class="directive"><Directory></code> and
  591.     <code></Directory></code> are used to enclose a group of
  592.     directives that will apply only to the named directory and
  593.     sub-directories of that directory. Any directive that is allowed
  594.     in a directory context may be used. <var>Directory-path</var> is
  595.     either the full path to a directory, or a wild-card string using
  596.     Unix shell-style matching. In a wild-card string, <code>?</code> matches
  597.     any single character, and <code>*</code> matches any sequences of
  598.     characters. You may also use <code>[]</code> character ranges. None
  599.     of the wildcards match a `/' character, so <code><Directory
  600.     /*/public_html></code> will not match
  601.     <code>/home/user/public_html</code>, but <code><Directory
  602.     /home/*/public_html></code> will match. Example:</p>
  603.  
  604.     <div class="example"><p><code>
  605.       <Directory /usr/local/httpd/htdocs><br />
  606.       <span class="indent">
  607.         Options Indexes FollowSymLinks<br />
  608.       </span>
  609.       </Directory>
  610.     </code></p></div>
  611.  
  612.     <div class="note">
  613.       <p>Be careful with the <var>directory-path</var> arguments:
  614.       They have to literally match the filesystem path which Apache uses
  615.       to access the files. Directives applied to a particular
  616.       <code><Directory></code> will not apply to files accessed from
  617.       that same directory via a different path, such as via different symbolic
  618.       links.</p>
  619.     </div>
  620.  
  621.     <p>Extended regular
  622.     expressions can also be used, with the addition of the
  623.     <code>~</code> character. For example:</p>
  624.  
  625.     <div class="example"><p><code>
  626.       <Directory ~ "^/www/.*/[0-9]{3}">
  627.     </code></p></div>
  628.  
  629.     <p>would match directories in <code>/www/</code> that consisted of
  630.     three numbers.</p>
  631.  
  632.     <p>If multiple (non-regular expression) <code class="directive"><Directory></code> sections
  633.     match the directory (or one of its parents) containing a document,
  634.     then the directives are applied in the order of shortest match
  635.     first, interspersed with the directives from the <a href="#accessfilename">.htaccess</a> files. For example,
  636.     with</p>
  637.  
  638.     <div class="example"><p><code>
  639.       <Directory /><br />
  640.       <span class="indent">
  641.         AllowOverride None<br />
  642.       </span>
  643.       </Directory><br />
  644.       <br />
  645.       <Directory /home/><br />
  646.       <span class="indent">
  647.         AllowOverride FileInfo<br />
  648.       </span>
  649.       </Directory>
  650.     </code></p></div>
  651.  
  652.     <p>for access to the document <code>/home/web/dir/doc.html</code>
  653.     the steps are:</p>
  654.  
  655.     <ul>
  656.       <li>Apply directive <code>AllowOverride None</code>
  657.       (disabling <code>.htaccess</code> files).</li>
  658.  
  659.       <li>Apply directive <code>AllowOverride FileInfo</code> (for
  660.       directory <code>/home</code>).</li>
  661.  
  662.       <li>Apply any <code>FileInfo</code> directives in
  663.       <code>/home/.htaccess</code>, <code>/home/web/.htaccess</code> and
  664.       <code>/home/web/dir/.htaccess</code> in that order.</li>
  665.     </ul>
  666.  
  667.     <p>Regular expressions are not considered until after all of the
  668.     normal sections have been applied. Then all of the regular
  669.     expressions are tested in the order they appeared in the
  670.     configuration file. For example, with</p>
  671.  
  672.     <div class="example"><p><code>
  673.       <Directory ~ abc$><br />
  674.       <span class="indent">
  675.         # ... directives here ...<br />
  676.       </span>
  677.       </Directory>
  678.     </code></p></div>
  679.  
  680.     <p>the regular expression section won't be considered until after
  681.     all normal <code class="directive"><Directory></code>s and
  682.     <code>.htaccess</code> files have been applied. Then the regular
  683.     expression will match on <code>/home/abc/public_html/abc</code> and
  684.     the corresponding <code class="directive"><Directory></code> will
  685.     be applied.</p>
  686.  
  687.    <p><strong>Note that the default Apache access for
  688.     <code><Directory /></code> is <code>Allow from All</code>.
  689.     This means that Apache will serve any file mapped from an URL. It is
  690.     recommended that you change this with a block such
  691.     as</strong></p>
  692.  
  693.     <div class="example"><p><code>
  694.       <Directory /><br />
  695.       <span class="indent">
  696.         Order Deny,Allow<br />
  697.         Deny from All<br />
  698.       </span>
  699.       </Directory>
  700.     </code></p></div>
  701.  
  702.     <p><strong>and then override this for directories you
  703.     <em>want</em> accessible. See the <a href="../misc/security_tips.html">Security Tips</a> page for more
  704.     details.</strong></p>
  705.  
  706.     <p>The directory sections occur in the <code>httpd.conf</code> file.
  707.     <code class="directive"><Directory></code> directives
  708.     cannot nest, and cannot appear in a <code class="directive"><a href="#limit"><Limit></a></code> or <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> section.</p>
  709.  
  710. <h3>See also</h3>
  711. <ul>
  712. <li><a href="../sections.html">How <Directory>,
  713.     <Location> and <Files> sections work</a> for an
  714.     explanation of how these different sections are combined when a
  715.     request is received</li>
  716. </ul>
  717. </div>
  718. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  719. <div class="directive-section"><h2><a name="DirectoryMatch" id="DirectoryMatch"><DirectoryMatch></a> <a name="directorymatch" id="directorymatch">Directive</a></h2>
  720. <table class="directive">
  721. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enclose directives that apply to
  722. file-system directories matching a regular expression and their
  723. subdirectories</td></tr>
  724. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><DirectoryMatch <var>regex</var>>
  725. ... </DirectoryMatch></code></td></tr>
  726. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  727. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  728. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  729. </table>
  730.     <p><code class="directive"><DirectoryMatch></code> and
  731.     <code></DirectoryMatch></code> are used to enclose a group
  732.     of directives which will apply only to the named directory and
  733.     sub-directories of that directory, the same as <code class="directive"><a href="#directory"><Directory></a></code>. However, it
  734.     takes as an argument a regular expression. For example:</p>
  735.  
  736.     <div class="example"><p><code>
  737.       <DirectoryMatch "^/www/.*/[0-9]{3}">
  738.     </code></p></div>
  739.  
  740.     <p>would match directories in <code>/www/</code> that consisted of three
  741.     numbers.</p>
  742.  
  743. <h3>See also</h3>
  744. <ul>
  745. <li><code class="directive"><a href="#directory"><Directory></a></code> for
  746. a description of how regular expressions are mixed in with normal
  747. <code class="directive"><Directory></code>s</li>
  748. <li><a href="../sections.html">How <Directory>, <Location> and
  749. <Files> sections work</a> for an explanation of how these different
  750. sections are combined when a request is received</li>
  751. </ul>
  752. </div>
  753. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  754. <div class="directive-section"><h2><a name="DocumentRoot" id="DocumentRoot">DocumentRoot</a> <a name="documentroot" id="documentroot">Directive</a></h2>
  755. <table class="directive">
  756. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory that forms the main document tree visible
  757. from the web</td></tr>
  758. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DocumentRoot <var>directory-path</var></code></td></tr>
  759. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DocumentRoot /usr/local/apache/htdocs</code></td></tr>
  760. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  761. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  762. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  763. </table>
  764.     <p>This directive sets the directory from which <code>httpd</code>
  765.     will serve files. Unless matched by a directive like <code class="directive"><a href="../mod/mod_alias.html#alias">Alias</a></code>, the server appends the
  766.     path from the requested URL to the document root to make the
  767.     path to the document. Example:</p>
  768.  
  769.     <div class="example"><p><code>
  770.       DocumentRoot /usr/web
  771.     </code></p></div>
  772.  
  773.     <p>then an access to
  774.     <code>http://www.my.host.com/index.html</code> refers to
  775.     <code>/usr/web/index.html</code>.</p>
  776.  
  777.     <p>The <code class="directive">DocumentRoot</code> should be specified without
  778.     a trailing slash.</p>
  779.  
  780. <h3>See also</h3>
  781. <ul>
  782. <li><a href="../urlmapping.html">Mapping URLs to Filesystem
  783. Location</a></li>
  784. </ul>
  785. </div>
  786. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  787. <div class="directive-section"><h2><a name="EnableMMAP" id="EnableMMAP">EnableMMAP</a> <a name="enablemmap" id="enablemmap">Directive</a></h2>
  788. <table class="directive">
  789. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Use memory-mapping to read files during delivery</td></tr>
  790. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>EnableMMAP On|Off</code></td></tr>
  791. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>EnableMMAP On</code></td></tr>
  792. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  793. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
  794. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  795. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  796. </table>
  797.     <p>This directive controls whether the <code>httpd</code> may use
  798.     memory-mapping if it needs to read the contents of a file during
  799.     delivery.  By default, when the handling of a request requires
  800.     access to the data within a file -- for example, when delivering a
  801.     server-parsed file using <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> -- Apache
  802.     memory-maps the file if the OS supports it.</p>
  803.  
  804.     <p>This memory-mapping sometimes yields a performance improvement.
  805.     But in some environments, it is better to disable the memory-mapping
  806.     to prevent operational problems:</p>
  807.  
  808.     <ul>
  809.     <li>On some multiprocessor systems, memory-mapping can reduce the
  810.     performance of the <code>httpd</code>.</li>
  811.     <li>With an NFS-mounted <code class="directive"><a href="#documentroot">DocumentRoot</a></code>,
  812.     the <code>httpd</code> may crash due to a segmentation fault if a file
  813.     is deleted or truncated while the <code>httpd</code> has it
  814.     memory-mapped.</li>
  815.     </ul>
  816.  
  817.     <p>For server configurations that are vulnerable to these problems,
  818.     you should disable memory-mapping of delivered files by specifying:</p>
  819.  
  820.     <div class="example"><p><code>
  821.       EnableMMAP Off
  822.     </code></p></div>
  823.  
  824.     <p>For NFS mounted files, this feature may be disabled explicitly for
  825.     the offending files by specifying:</p>
  826.  
  827.     <div class="example"><p><code>
  828.       <Directory "/path-to-nfs-files">
  829.       <span class="indent">
  830.         EnableMMAP Off
  831.       </span>
  832.       </Directory>
  833.     </code></p></div>
  834.  
  835. </div>
  836. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  837. <div class="directive-section"><h2><a name="EnableSendfile" id="EnableSendfile">EnableSendfile</a> <a name="enablesendfile" id="enablesendfile">Directive</a></h2>
  838. <table class="directive">
  839. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Use the kernel sendfile support to deliver files to the client</td></tr>
  840. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>EnableSendfile On|Off</code></td></tr>
  841. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>EnableSendfile On</code></td></tr>
  842. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  843. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
  844. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  845. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  846. <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.0.44 and later</td></tr>
  847. </table>
  848.     <p>This directive controls whether <code>httpd</code> may use the sendfile
  849.     support from the kernel to transmit file contents to the client.
  850.     By default, when the handling of a request requires no access
  851.     to the data within a file -- for example, when delivering a
  852.     static file -- Apache uses sendfile to deliver the file contents
  853.     without ever reading the file if the OS supports it.</p>
  854.  
  855.     <p>This sendfile mechanism avoids seperate read and send operations,
  856.     and buffer allocations. But on some platforms or within some
  857.     filesystems, it is better to disable this feature to avoid
  858.     operational problems:</p>
  859.  
  860.     <ul>
  861.     <li>Some platforms may have broken sendfile support that the build
  862.     system did not detect, especially if the binaries were built on
  863.     another box and moved to such a machine with broken sendfile
  864.     support.</li>
  865.     <li>On Linux the use of sendfile triggers TCP-checksum
  866.     offloading bugs on certain networking cards when using IPv6.</li>
  867.     <li>With a network-mounted <code class="directive"><a href="#documentroot">DocumentRoot</a></code> (e.g., NFS or SMB),
  868.     the kernel may be unable to serve the network file through
  869.     its own cache.</li>
  870.     </ul>
  871.  
  872.     <p>For server configurations that are vulnerable to these problems,
  873.     you should disable this feature by specifying:</p>
  874.  
  875.     <div class="example"><p><code>
  876.       EnableSendfile Off
  877.     </code></p></div>
  878.  
  879.     <p>For NFS or SMB mounted files, this feature may be disabled explicitly
  880.     for the offending files by specifying:</p>
  881.  
  882.     <div class="example"><p><code>
  883.       <Directory "/path-to-nfs-files">
  884.       <span class="indent">
  885.         EnableSendfile Off
  886.       </span>
  887.       </Directory>
  888.     </code></p></div>
  889.  
  890. </div>
  891. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  892. <div class="directive-section"><h2><a name="ErrorDocument" id="ErrorDocument">ErrorDocument</a> <a name="errordocument" id="errordocument">Directive</a></h2>
  893. <table class="directive">
  894. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>What the server will return to the client
  895. in case of an error</td></tr>
  896. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ErrorDocument <var>error-code</var> <var>document</var></code></td></tr>
  897. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  898. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
  899. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  900. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  901. <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Quoting syntax for text messages is different in Apache
  902. 2.0</td></tr>
  903. </table>
  904.     <p>In the event of a problem or error, Apache can be configured
  905.     to do one of four things,</p>
  906.  
  907.     <ol>
  908.       <li>output a simple hardcoded error message</li>
  909.  
  910.       <li>output a customized message</li>
  911.  
  912.       <li>redirect to a local <var>URL-path</var> to handle the
  913.       problem/error</li>
  914.  
  915.       <li>redirect to an external <var>URL</var> to handle the
  916.       problem/error</li>
  917.     </ol>
  918.  
  919.     <p>The first option is the default, while options 2-4 are
  920.     configured using the <code class="directive">ErrorDocument</code>
  921.     directive, which is followed by the HTTP response code and a URL
  922.     or a message. Apache will sometimes offer additional information
  923.     regarding the problem/error.</p>
  924.  
  925.     <p>URLs can begin with a slash (/) for local URLs, or be a full
  926.     URL which the client can resolve. Alternatively, a message can
  927.     be provided to be displayed by the browser. Examples:</p>
  928.  
  929.     <div class="example"><p><code>
  930.       ErrorDocument 500 http://foo.example.com/cgi-bin/tester<br />
  931.       ErrorDocument 404 /cgi-bin/bad_urls.pl<br />
  932.       ErrorDocument 401 /subscription_info.html<br />
  933.       ErrorDocument 403 "Sorry can't allow you access today"
  934.     </code></p></div>
  935.  
  936.     <p>Note that when you specify an <code class="directive">ErrorDocument</code>
  937.     that points to a remote URL (ie. anything with a method such as
  938.     <code>http</code> in front of it), Apache will send a redirect to the
  939.     client to tell it where to find the document, even if the
  940.     document ends up being on the same server. This has several
  941.     implications, the most important being that the client will not
  942.     receive the original error status code, but instead will
  943.     receive a redirect status code. This in turn can confuse web
  944.     robots and other clients which try to determine if a URL is
  945.     valid using the status code. In addition, if you use a remote
  946.     URL in an <code>ErrorDocument 401</code>, the client will not
  947.     know to prompt the user for a password since it will not
  948.     receive the 401 status code. Therefore, <strong>if you use an
  949.     <code>ErrorDocument 401</code> directive then it must refer to a local
  950.     document.</strong></p>
  951.  
  952.     <p>Microsoft Internet Explorer (MSIE) will by default ignore
  953.     server-generated error messages when they are "too small" and substitute
  954.     its own "friendly" error messages. The size threshold varies depending on
  955.     the type of error, but in general, if you make your error document
  956.     greater than 512 bytes, then MSIE will show the server-generated
  957.     error rather than masking it.  More information is available in
  958.     Microsoft Knowledgebase article <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807">Q294807</a>.</p>
  959.  
  960.     <p>Prior to version 2.0, messages were indicated by prefixing
  961.     them with a single unmatched double quote character.</p>
  962.  
  963. <h3>See also</h3>
  964. <ul>
  965. <li><a href="../custom-error.html">documentation of
  966.     customizable responses</a></li>
  967. </ul>
  968. </div>
  969. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  970. <div class="directive-section"><h2><a name="ErrorLog" id="ErrorLog">ErrorLog</a> <a name="errorlog" id="errorlog">Directive</a></h2>
  971. <table class="directive">
  972. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Location where the server will log errors</td></tr>
  973. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code> ErrorLog <var>file-path</var>|syslog[:<var>facility</var>]</code></td></tr>
  974. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ErrorLog logs/error_log (Unix) ErrorLog logs/error.log (Windows and OS/2)</code></td></tr>
  975. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  976. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  977. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  978. </table>
  979.     <p>The <code class="directive">ErrorLog</code> directive sets the name of
  980.     the file to which the server will log any errors it encounters. If
  981.     the <var>file-path</var> is not absolute (in general: does not begin
  982.     with a slash (/)) then it is assumed to be relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p>
  983.  
  984.     <div class="example"><h3>Example</h3><p><code>
  985.     ErrorLog /var/log/httpd/error_log
  986.     </code></p></div>
  987.  
  988.     <p>If the <var>file-path</var>
  989.     begins with a pipe (|) then it is assumed to be a command to spawn
  990.     to handle the error log.</p>
  991.  
  992.     <div class="example"><h3>Example</h3><p><code>
  993.     ErrorLog "|/usr/local/bin/httpd_errors"
  994.     </code></p></div>
  995.  
  996.     <p>Using <code>syslog</code> instead of a filename enables logging
  997.     via syslogd(8) if the system supports it. The default is to use
  998.     syslog facility <code>local7</code>, but you can override this by
  999.     using the <code>syslog:<var>facility</var></code> syntax where
  1000.     <var>facility</var> can be one of the names usually documented in
  1001.     syslog(1).</p>
  1002.  
  1003.     <div class="example"><h3>Example</h3><p><code>
  1004.     ErrorLog syslog:user
  1005.     </code></p></div>
  1006.  
  1007.     <p>SECURITY: See the <a href="../misc/security_tips.html#serverroot">security tips</a>
  1008.     document for details on why your security could be compromised
  1009.     if the directory where logfiles are stored is writable by
  1010.     anyone other than the user that starts the server.</p>
  1011.     <div class="warning"><h3>Note</h3>
  1012.       <p>When entering a file path on non-Unix platforms, care should be taken
  1013.       to make sure that only forward slashed are used even though the platform
  1014.       may allow the use of back slashes. In general it is a good idea to always 
  1015.       use forward slashes throughout the configuration files.</p>
  1016.     </div>
  1017.  
  1018. <h3>See also</h3>
  1019. <ul>
  1020. <li><code class="directive"><a href="#loglevel">LogLevel</a></code></li>
  1021. <li><a href="../logs.html">Apache Log Files</a></li>
  1022. </ul>
  1023. </div>
  1024. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1025. <div class="directive-section"><h2><a name="FileETag" id="FileETag">FileETag</a> <a name="fileetag" id="fileetag">Directive</a></h2>
  1026. <table class="directive">
  1027. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File attributes used to create the ETag
  1028. HTTP response header</td></tr>
  1029. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FileETag <var>component</var> ...</code></td></tr>
  1030. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FileETag INode MTime Size</code></td></tr>
  1031. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  1032. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
  1033. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  1034. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  1035. </table>
  1036.     <p>
  1037.     The <code class="directive">FileETag</code> directive configures the file
  1038.     attributes that are used to create the <code>ETag</code> (entity
  1039.     tag) response header field when the document is based on a file.
  1040.     (The <code>ETag</code> value is used in cache management to save
  1041.     network bandwidth.) In Apache 1.3.22 and earlier, the
  1042.     <code>ETag</code> value was <em>always</em> formed
  1043.     from the file's inode, size, and last-modified time (mtime). The
  1044.     <code class="directive">FileETag</code> directive allows you to choose
  1045.     which of these -- if any -- should be used. The recognized keywords are:
  1046.     </p>
  1047.  
  1048.     <dl>
  1049.      <dt><strong>INode</strong></dt>
  1050.      <dd>The file's i-node number will be included in the calculation</dd>
  1051.      <dt><strong>MTime</strong></dt>
  1052.      <dd>The date and time the file was last modified will be included</dd>
  1053.      <dt><strong>Size</strong></dt>
  1054.      <dd>The number of bytes in the file will be included</dd>
  1055.      <dt><strong>All</strong></dt>
  1056.      <dd>All available fields will be used. This is equivalent to:
  1057.          <div class="example"><p><code>FileETag INode MTime Size</code></p></div></dd>
  1058.      <dt><strong>None</strong></dt>
  1059.      <dd>If a document is file-based, no <code>ETag</code> field will be
  1060.        included in the response</dd>
  1061.     </dl>
  1062.  
  1063.     <p>The <code>INode</code>, <code>MTime</code>, and <code>Size</code>
  1064.     keywords may be prefixed with either <code>+</code> or <code>-</code>,
  1065.     which allow changes to be made to the default setting inherited
  1066.     from a broader scope. Any keyword appearing without such a prefix
  1067.     immediately and completely cancels the inherited setting.</p>
  1068.  
  1069.     <p>If a directory's configuration includes
  1070.     <code>FileETag INode MTime Size</code>, and a
  1071.     subdirectory's includes <code>FileETag -INode</code>,
  1072.     the setting for that subdirectory (which will be inherited by
  1073.     any sub-subdirectories that don't override it) will be equivalent to
  1074.     <code>FileETag MTime Size</code>.</p>
  1075.  
  1076. </div>
  1077. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1078. <div class="directive-section"><h2><a name="Files" id="Files"><Files></a> <a name="files" id="files">Directive</a></h2>
  1079. <table class="directive">
  1080. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply to matched
  1081. filenames</td></tr>
  1082. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Files <var>filename</var>> ... </Files></code></td></tr>
  1083. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  1084. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
  1085. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  1086. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  1087. </table>
  1088.     <p>The <code class="directive"><Files></code> directive
  1089.     limits the scope of the enclosed directives by filename. It is comparable
  1090.     to the <code class="directive"><a href="#directory"><Directory></a></code>
  1091.     and <code class="directive"><a href="#location"><Location></a></code>
  1092.     directives. It should be matched with a <code></Files></code>
  1093.     directive. The directives given within this section will be applied to
  1094.     any object with a basename (last component of filename) matching the
  1095.     specified filename. <code class="directive"><Files></code>
  1096.     sections are processed in the order they appear in the
  1097.     configuration file, after the <code class="directive"><a href="#directory"><Directory></a></code> sections and
  1098.     <code>.htaccess</code> files are read, but before <code class="directive"><a href="#location"><Location></a></code> sections. Note
  1099.     that <code class="directive"><Files></code> can be nested
  1100.     inside <code class="directive"><a href="#directory"><Directory></a></code> sections to restrict the
  1101.     portion of the filesystem they apply to.</p>
  1102.  
  1103.     <p>The <var>filename</var> argument should include a filename, or
  1104.     a wild-card string, where <code>?</code> matches any single character,
  1105.     and <code>*</code> matches any sequences of characters. Extended regular
  1106.     expressions can also be used, with the addition of the
  1107.     <code>~</code> character. For example:</p>
  1108.  
  1109.     <div class="example"><p><code>
  1110.       <Files ~ "\.(gif|jpe?g|png)$">
  1111.     </code></p></div>
  1112.  
  1113.     <p>would match most common Internet graphics formats. <code class="directive"><a href="#filesmatch"><FilesMatch></a></code> is preferred,
  1114.     however.</p>
  1115.  
  1116.     <p>Note that unlike <code class="directive"><a href="#directory"><Directory></a></code> and <code class="directive"><a href="#location"><Location></a></code> sections, <code class="directive"><Files></code> sections can be used inside
  1117.     <code>.htaccess</code> files. This allows users to control access to
  1118.     their own files, at a file-by-file level.</p>
  1119.  
  1120.  
  1121. <h3>See also</h3>
  1122. <ul>
  1123. <li><a href="../sections.html">How <Directory>, <Location>
  1124.     and <Files> sections work</a> for an explanation of how these
  1125.     different sections are combined when a request is received</li>
  1126. </ul>
  1127. </div>
  1128. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1129. <div class="directive-section"><h2><a name="FilesMatch" id="FilesMatch"><FilesMatch></a> <a name="filesmatch" id="filesmatch">Directive</a></h2>
  1130. <table class="directive">
  1131. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply to regular-expression matched
  1132. filenames</td></tr>
  1133. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><FilesMatch <var>regex</var>> ... </FilesMatch></code></td></tr>
  1134. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  1135. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
  1136. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  1137. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  1138. </table>
  1139.     <p>The <code class="directive"><FilesMatch></code> directive
  1140.     limits the scope of the enclosed directives by filename, just as the
  1141.     <code class="directive"><a href="#files"><Files></a></code> directive
  1142.     does. However, it accepts a regular expression. For example:</p>
  1143.  
  1144.     <div class="example"><p><code>
  1145.       <FilesMatch "\.(gif|jpe?g|png)$">
  1146.     </code></p></div>
  1147.  
  1148.     <p>would match most common Internet graphics formats.</p>
  1149.  
  1150. <h3>See also</h3>
  1151. <ul>
  1152. <li><a href="../sections.html">How <Directory>, <Location>
  1153.     and <Files> sections work</a> for an explanation of how these
  1154.     different sections are combined when a request is received</li>
  1155. </ul>
  1156. </div>
  1157. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1158. <div class="directive-section"><h2><a name="ForceType" id="ForceType">ForceType</a> <a name="forcetype" id="forcetype">Directive</a></h2>
  1159. <table class="directive">
  1160. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Forces all matching files to be served with the specified
  1161. MIME content-type</td></tr>
  1162. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ForceType <var>MIME-type</var>|None</code></td></tr>
  1163. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
  1164. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
  1165. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  1166. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  1167. <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Moved to the core in Apache 2.0</td></tr>
  1168. </table>
  1169.     <p>When placed into an <code>.htaccess</code> file or a
  1170.     <code class="directive"><a href="#directory"><Directory></a></code>, or
  1171.     <code class="directive"><a href="#location"><Location></a></code> or
  1172.     <code class="directive"><a href="#files"><Files></a></code>
  1173.     section, this directive forces all matching files to be served
  1174.     with the content type identification given by
  1175.     <var>MIME-type</var>. For example, if you had a directory full of
  1176.     GIF files, but did not want to label them all with <code>.gif</code>,
  1177.     you might want to use:</p>
  1178.  
  1179.     <div class="example"><p><code>
  1180.       ForceType image/gif
  1181.     </code></p></div>
  1182.  
  1183.     <p>Note that unlike <code class="directive"><a href="#defaulttype">DefaultType</a></code>,
  1184.     this directive overrides all mime-type associations, including
  1185.     filename extensions, that might identify the media type.</p>
  1186.  
  1187.     <p>You can override any <code class="directive">ForceType</code> setting
  1188.     by using the value of <code>None</code>:</p>
  1189.  
  1190.     <div class="example"><p><code>
  1191.       # force all files to be image/gif:<br />
  1192.       <Location /images><br />
  1193.         <span class="indent">
  1194.           ForceType image/gif<br />
  1195.         </span>
  1196.       </Location><br />
  1197.       <br />
  1198.       # but normal mime-type associations here:<br />
  1199.       <Location /images/mixed><br />
  1200.       <span class="indent">
  1201.         ForceType None<br />
  1202.       </span>
  1203.       </Location>
  1204.     </code></p></div>
  1205.  
  1206. </div>
  1207. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1208. <div class="directive-section"><h2><a name="HostnameLookups" id="HostnameLookups">HostnameLookups</a> <a name="hostnamelookups" id="hostnamelookups">Directive</a></h2>
  1209. <table class="directive">
  1210. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables DNS lookups on client IP addresses</td></tr>
  1211. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>HostnameLookups On|Off|Double</code></td></tr>
  1212. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>HostnameLookups Off</code></td></tr>
  1213. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
  1214. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  1215. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  1216. </table>
  1217.     <p>This directive enables DNS lookups so that host names can be
  1218.     logged (and passed to CGIs/SSIs in <code>REMOTE_HOST</code>).
  1219.     The value <code>Double</code> refers to doing double-reverse
  1220.     DNS lookup. That is, after a reverse lookup is performed, a forward
  1221.     lookup is then performed on that result. At least one of the ip
  1222.     addresses in the forward lookup must match the original
  1223.     address. (In "tcpwrappers" terminology this is called
  1224.     <code>PARANOID</code>.)</p>
  1225.  
  1226.     <p>Regardless of the setting, when <code class="module"><a href="../mod/mod_access.html">mod_access</a></code> is
  1227.     used for controlling access by hostname, a double reverse lookup
  1228.     will be performed.  This is necessary for security. Note that the
  1229.     result of this double-reverse isn't generally available unless you
  1230.     set <code>HostnameLookups Double</code>. For example, if only
  1231.     <code>HostnameLookups On</code> and a request is made to an object
  1232.     that is protected by hostname restrictions, regardless of whether
  1233.     the double-reverse fails or not, CGIs will still be passed the
  1234.     single-reverse result in <code>REMOTE_HOST</code>.</p>
  1235.  
  1236.     <p>The default is <code>Off</code> in order to save the network
  1237.     traffic for those sites that don't truly need the reverse
  1238.     lookups done. It is also better for the end users because they
  1239.     don't have to suffer the extra latency that a lookup entails.
  1240.     Heavily loaded sites should leave this directive
  1241.     <code>Off</code>, since DNS lookups can take considerable
  1242.     amounts of time. The utility <a href="../programs/logresolve.html">logresolve</a>, compiled by default
  1243.     to the <code>bin</code> subdirectory of your installation directory, can
  1244.     be used to look up host names from logged IP addresses offline.</p>
  1245.  
  1246. </div>
  1247. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1248. <div class="directive-section"><h2><a name="IdentityCheck" id="IdentityCheck">IdentityCheck</a> <a name="identitycheck" id="identitycheck">Directive</a></h2>
  1249. <table class="directive">
  1250. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables logging of the RFC1413 identity of the remote
  1251. user</td></tr>
  1252. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IdentityCheck On|Off</code></td></tr>
  1253. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>IdentityCheck Off</code></td></tr>
  1254. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
  1255. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  1256. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  1257. </table>
  1258.     <p>This directive enables RFC1413-compliant logging of the
  1259.     remote user name for each connection, where the client machine
  1260.     runs identd or something similar. This information is logged in
  1261.     the access log.</p>
  1262.  
  1263.     <p>The information should not be trusted in any way except for
  1264.     rudimentary usage tracking.</p>
  1265.  
  1266.     <p>Note that this can cause serious latency problems accessing
  1267.     your server since every request requires one of these lookups
  1268.     to be performed. When firewalls are involved each lookup might
  1269.     possibly fail and add 30 seconds of latency to each hit. So in
  1270.     general this is not very useful on public servers accessible
  1271.     from the Internet.</p>
  1272.  
  1273. </div>
  1274. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1275. <div class="directive-section"><h2><a name="IfDefine" id="IfDefine"><IfDefine></a> <a name="ifdefine" id="ifdefine">Directive</a></h2>
  1276. <table class="directive">
  1277. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Encloses directives that will be processed only
  1278. if a test is true at startup</td></tr>
  1279. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><IfDefine [!]<var>parameter-name</var>> ...
  1280.     </IfDefine></code></td></tr>
  1281. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  1282. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
  1283. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  1284. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  1285. </table>
  1286.     <p>The <code><IfDefine <var>test</var>>...</IfDefine>
  1287.     </code> section is used to mark directives that are conditional. The
  1288.     directives within an <code class="directive"><IfDefine></code>
  1289.     section are only processed if the <var>test</var> is true. If <var>
  1290.     test</var> is false, everything between the start and end markers is
  1291.     ignored.</p>
  1292.  
  1293.     <p>The <var>test</var> in the <code class="directive"><IfDefine></code> section directive can be one of two forms:</p>
  1294.  
  1295.     <ul>
  1296.       <li><var>parameter-name</var></li>
  1297.  
  1298.       <li><code>!</code><var>parameter-name</var></li>
  1299.     </ul>
  1300.  
  1301.     <p>In the former case, the directives between the start and end
  1302.     markers are only processed if the parameter named
  1303.     <var>parameter-name</var> is defined. The second format reverses
  1304.     the test, and only processes the directives if
  1305.     <var>parameter-name</var> is <strong>not</strong> defined.</p>
  1306.  
  1307.     <p>The <var>parameter-name</var> argument is a define as given on
  1308.     the <code>httpd</code> command line via <code>-D<var>parameter-</var>
  1309.     </code>, at the time the server was started.</p>
  1310.  
  1311.     <p><code class="directive"><IfDefine></code> sections are
  1312.     nest-able, which can be used to implement simple
  1313.     multiple-parameter tests. Example:</p>
  1314.  
  1315.     <div class="example"><p><code>
  1316.       httpd -DReverseProxy ...<br />
  1317.       <br />
  1318.       # httpd.conf<br />
  1319.       <IfDefine ReverseProxy><br />
  1320.       <span class="indent">
  1321.         LoadModule rewrite_module modules/mod_rewrite.so<br />
  1322.         LoadModule proxy_module   modules/libproxy.so<br />
  1323.       </span>
  1324.       </IfDefine>
  1325.     </code></p></div>
  1326.  
  1327. </div>
  1328. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1329. <div class="directive-section"><h2><a name="IfModule" id="IfModule"><IfModule></a> <a name="ifmodule" id="ifmodule">Directive</a></h2>
  1330. <table class="directive">
  1331. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Encloses directives that are processed conditional on the
  1332. presence or absence of a specific module</td></tr>
  1333. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><IfModule [!]<var>module-name</var>> ...
  1334.     </IfModule></code></td></tr>
  1335. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  1336. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
  1337. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  1338. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  1339. </table>
  1340.     <p>The <code><IfModule <var>test</var>>...</IfModule></code>
  1341.     section is used to mark directives that are conditional on the presence of
  1342.     a specific module. The directives within an <code class="directive"><IfModule></code> section are only processed if the <var>test</var>
  1343.     is true. If <var>test</var> is false, everything between the start and
  1344.     end markers is ignored.</p>
  1345.  
  1346.     <p>The <var>test</var> in the <code class="directive"><IfModule></code> section directive can be one of two forms:</p>
  1347.  
  1348.     <ul>
  1349.       <li><var>module name</var></li>
  1350.  
  1351.       <li>!<var>module name</var></li>
  1352.     </ul>
  1353.  
  1354.     <p>In the former case, the directives between the start and end
  1355.     markers are only processed if the module named <var>module
  1356.     name</var> is included in Apache -- either compiled in or
  1357.     dynamically loaded using <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code>. The second format reverses the test,
  1358.     and only processes the directives if <var>module name</var> is
  1359.     <strong>not</strong> included.</p>
  1360.  
  1361.     <p>The <var>module name</var> argument is the file name of the
  1362.     module, at the time it was compiled.  For example,
  1363.     <code>mod_rewrite.c</code>.  If a module consists of several
  1364.     source files, use the name of the file containing the string
  1365.     <code>STANDARD20_MODULE_STUFF</code>.</p>
  1366.  
  1367.     <p><code class="directive"><IfModule></code> sections are
  1368.     nest-able, which can be used to implement simple multiple-module
  1369.     tests.</p>
  1370.  
  1371.     <div class="note">This section should only be used if you need to have one
  1372.     configuration file that works whether or not a specific module
  1373.     is available. In normal operation, directives need not be
  1374.     placed in <code class="directive"><IfModule></code>
  1375.     sections.</div>
  1376.  
  1377. </div>
  1378. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1379. <div class="directive-section"><h2><a name="Include" id="Include">Include</a> <a name="include" id="include">Directive</a></h2>
  1380. <table class="directive">
  1381. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Includes other configuration files from within
  1382. the server configuration files</td></tr>
  1383. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Include <var>file-path</var>|<var>directory-path</var></code></td></tr>
  1384. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
  1385. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  1386. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  1387. <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Wildcard matching available in 2.0.41 and later</td></tr>
  1388. </table>
  1389.     <p>This directive allows inclusion of other configuration files
  1390.     from within the server configuration files.</p>
  1391.  
  1392.     <p>Shell-style (<code>fnmatch()</code>) wildcard characters can be used to
  1393.     include several files at once, in alphabetical order. In
  1394.     addition, if <code class="directive">Include</code> points to a directory,
  1395.     rather than a file, Apache will read all files in that directory
  1396.     and any subdirectory.  But including entire directories is not
  1397.     recommended, because it is easy to accidentally leave temporary
  1398.     files in a directory that can cause <code>httpd</code> to
  1399.     fail.</p>
  1400.  
  1401.     <p>The file path specified may be an absolute path (i.e.
  1402.     starting with a slash), or may be relative to the
  1403.     <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory.</p>
  1404.  
  1405.     <p>Examples:</p>
  1406.  
  1407.     <div class="example"><p><code>
  1408.       Include /usr/local/apache2/conf/ssl.conf<br />
  1409.       Include /usr/local/apache2/conf/vhosts/*.conf
  1410.     </code></p></div>
  1411.  
  1412.     <p>Or, providing paths relative to your <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory:</p>
  1413.  
  1414.     <div class="example"><p><code>
  1415.       Include conf/ssl.conf<br />
  1416.       Include conf/vhosts/*.conf
  1417.     </code></p></div>
  1418.  
  1419.     <p>Running <code>apachectl configtest</code> will give you a list
  1420.     of the files that are being processed during the configuration
  1421.     check:</p>
  1422.  
  1423.     <div class="example"><p><code>
  1424.       root@host# apachectl configtest<br />
  1425.       Processing config file: /usr/local/apache2/conf/ssl.conf<br />
  1426.       Processing config file: /usr/local/apache2/conf/vhosts/vhost1.conf<br />
  1427.       Processing config file: /usr/local/apache2/conf/vhosts/vhost2.conf<br />
  1428.       Syntax OK
  1429.     </code></p></div>
  1430.  
  1431. <h3>See also</h3>
  1432. <ul>
  1433. <li><a href="../programs/apachectl.html">apachectl</a></li>
  1434. </ul>
  1435. </div>
  1436. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1437. <div class="directive-section"><h2><a name="KeepAlive" id="KeepAlive">KeepAlive</a> <a name="keepalive" id="keepalive">Directive</a></h2>
  1438. <table class="directive">
  1439. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables HTTP persistent connections</td></tr>
  1440. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>KeepAlive On|Off</code></td></tr>
  1441. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>KeepAlive On</code></td></tr>
  1442. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  1443. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  1444. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  1445. </table>
  1446.     <p>The Keep-Alive extension to HTTP/1.0 and the persistent
  1447.     connection feature of HTTP/1.1 provide long-lived HTTP sessions
  1448.     which allow multiple requests to be sent over the same TCP
  1449.     connection. In some cases this has been shown to result in an
  1450.     almost 50% speedup in latency times for HTML documents with
  1451.     many images. To enable Keep-Alive connections, set
  1452.     <code>KeepAlive On</code>.</p>
  1453.  
  1454.     <p>For HTTP/1.0 clients, Keep-Alive connections will only be
  1455.     used if they are specifically requested by a client. In
  1456.     addition, a Keep-Alive connection with an HTTP/1.0 client can
  1457.     only be used when the length of the content is known in
  1458.     advance. This implies that dynamic content such as CGI output,
  1459.     SSI pages, and server-generated directory listings will
  1460.     generally not use Keep-Alive connections to HTTP/1.0 clients.
  1461.     For HTTP/1.1 clients, persistent connections are the default
  1462.     unless otherwise specified. If the client requests it, chunked
  1463.     encoding will be used in order to send content of unknown
  1464.     length over persistent connections.</p>
  1465.  
  1466. <h3>See also</h3>
  1467. <ul>
  1468. <li><code class="directive"><a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></code></li>
  1469. </ul>
  1470. </div>
  1471. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1472. <div class="directive-section"><h2><a name="KeepAliveTimeout" id="KeepAliveTimeout">KeepAliveTimeout</a> <a name="keepalivetimeout" id="keepalivetimeout">Directive</a></h2>
  1473. <table class="directive">
  1474. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Amount of time the server will wait for subsequent
  1475. requests on a persistent connection</td></tr>
  1476. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>KeepAliveTimeout <var>seconds</var></code></td></tr>
  1477. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>KeepAliveTimeout 15</code></td></tr>
  1478. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  1479. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  1480. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  1481. </table>
  1482.     <p>The number of seconds Apache will wait for a subsequent
  1483.     request before closing the connection. Once a request has been
  1484.     received, the timeout value specified by the
  1485.     <code class="directive"><a href="#timeout">Timeout</a></code> directive applies.</p>
  1486.  
  1487.     <p>Setting <code class="directive">KeepAliveTimeout</code> to a high value
  1488.     may cause performance problems in heavily loaded servers. The
  1489.     higher the timeout, the more server processes will be kept
  1490.     occupied waiting on connections with idle clients.</p>
  1491.  
  1492. </div>
  1493. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1494. <div class="directive-section"><h2><a name="Limit" id="Limit"><Limit></a> <a name="limit" id="limit">Directive</a></h2>
  1495. <table class="directive">
  1496. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restrict enclosed access controls to only certain HTTP
  1497. methods</td></tr>
  1498. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Limit <var>method</var> [<var>method</var>] ... > ...
  1499.     </Limit></code></td></tr>
  1500. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  1501. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
  1502. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  1503. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  1504. </table>
  1505.     <p>Access controls are normally effective for
  1506.     <strong>all</strong> access methods, and this is the usual
  1507.     desired behavior. <strong>In the general case, access control
  1508.     directives should not be placed within a
  1509.     <code class="directive"><Limit></code> section.</strong></p>
  1510.  
  1511.     <p>The purpose of the <code class="directive"><Limit></code>
  1512.     directive is to restrict the effect of the access controls to the
  1513.     nominated HTTP methods. For all other methods, the access
  1514.     restrictions that are enclosed in the <code class="directive"><Limit></code> bracket <strong>will have no
  1515.     effect</strong>. The following example applies the access control
  1516.     only to the methods <code>POST</code>, <code>PUT</code>, and
  1517.     <code>DELETE</code>, leaving all other methods unprotected:</p>
  1518.  
  1519.     <div class="example"><p><code>
  1520.       <Limit POST PUT DELETE><br />
  1521.       <span class="indent">
  1522.         Require valid-user<br />
  1523.       </span>
  1524.       </Limit>
  1525.     </code></p></div>
  1526.  
  1527.     <p>The method names listed can be one or more of: <code>GET</code>,
  1528.     <code>POST</code>, <code>PUT</code>, <code>DELETE</code>,
  1529.     <code>CONNECT</code>, <code>OPTIONS</code>,
  1530.     <code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>,
  1531.     <code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>,
  1532.     <code>LOCK</code>, and <code>UNLOCK</code>. <strong>The method name is
  1533.     case-sensitive.</strong> If <code>GET</code> is used it will also
  1534.     restrict <code>HEAD</code> requests. The <code>TRACE</code> method
  1535.     cannot be limited.</p>
  1536.  
  1537.     <div class="warning">A <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> section should always be
  1538.     used in preference to a <code class="directive"><a href="#limit"><Limit></a></code> section when restricting access,
  1539.     since a <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> section provides protection
  1540.     against arbitrary methods.</div>
  1541.  
  1542.  
  1543. </div>
  1544. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1545. <div class="directive-section"><h2><a name="LimitExcept" id="LimitExcept"><LimitExcept></a> <a name="limitexcept" id="limitexcept">Directive</a></h2>
  1546. <table class="directive">
  1547. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restrict access controls to all HTTP methods
  1548. except the named ones</td></tr>
  1549. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><LimitExcept <var>method</var> [<var>method</var>] ... > ...
  1550.     </LimitExcept></code></td></tr>
  1551. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  1552. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
  1553. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  1554. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  1555. </table>
  1556.     <p><code class="directive"><LimitExcept></code> and
  1557.     <code></LimitExcept></code> are used to enclose
  1558.     a group of access control directives which will then apply to any
  1559.     HTTP access method <strong>not</strong> listed in the arguments;
  1560.     i.e., it is the opposite of a <code class="directive"><a href="#limit"><Limit></a></code> section and can be used to control
  1561.     both standard and nonstandard/unrecognized methods. See the
  1562.     documentation for <code class="directive"><a href="#limit"><Limit></a></code> for more details.</p>
  1563.  
  1564.     <p>For example:</p>
  1565.  
  1566.     <div class="example"><p><code>
  1567.       <LimitExcept POST GET><br />
  1568.       <span class="indent">
  1569.         Require valid-user<br />
  1570.       </span>
  1571.       </LimitExcept>
  1572.     </code></p></div>
  1573.  
  1574.  
  1575. </div>
  1576. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1577. <div class="directive-section"><h2><a name="LimitInternalRecursion" id="LimitInternalRecursion">LimitInternalRecursion</a> <a name="limitinternalrecursion" id="limitinternalrecursion">Directive</a></h2>
  1578. <table class="directive">
  1579. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determine maximum number of internal redirects and nested
  1580. subrequests</td></tr>
  1581. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitInternalRecursion <var>number</var> [<var>number</var>]</code></td></tr>
  1582. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitInternalRecursion 10</code></td></tr>
  1583. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  1584. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  1585. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  1586. <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0.47 and later</td></tr>
  1587. </table>
  1588.     <p>An internal redirect happens, for example, when using the <code class="directive"><a href="../mod/mod_actions.html#action">Action</a></code> directive, which internally
  1589.     redirects the original request to a CGI script. A subrequest is Apache's
  1590.     mechanism to find out what would happen for some URI if it were requested.
  1591.     For example, <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code> uses subrequests to look for the
  1592.     files listed in the <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>
  1593.     directive.</p>
  1594.  
  1595.     <p><code class="directive">LimitInternalRecursion</code> prevents the server
  1596.     from crashing when entering an infinite loop of internal redirects or
  1597.     subrequests. Such loops are usually caused by misconfigurations.</p>
  1598.  
  1599.     <p>The directive stores two different limits, which are evaluated on
  1600.     per-request basis. The first <var>number</var> is the maximum number of
  1601.     internal redirects, that may follow each other. The second <var>number</var>
  1602.     determines, how deep subrequests may be nested. If you specify only one
  1603.     <var>number</var>, it will be assigned to both limits.</p>
  1604.  
  1605.     <div class="example"><h3>Example</h3><p><code>
  1606.       LimitInternalRecursion 5
  1607.     </code></p></div>
  1608.  
  1609. </div>
  1610. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1611. <div class="directive-section"><h2><a name="LimitRequestBody" id="LimitRequestBody">LimitRequestBody</a> <a name="limitrequestbody" id="limitrequestbody">Directive</a></h2>
  1612. <table class="directive">
  1613. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restricts the total size of the HTTP request body sent
  1614. from the client</td></tr>
  1615. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestBody <var>bytes</var></code></td></tr>
  1616. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestBody 0</code></td></tr>
  1617. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  1618. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
  1619. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  1620. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  1621. </table>
  1622.     <p>This directive specifies the number of <var>bytes</var> from 0
  1623.     (meaning unlimited) to 2147483647 (2GB) that are allowed in a
  1624.     request body.</p>
  1625.  
  1626.     <p>The <code class="directive">LimitRequestBody</code> directive allows
  1627.     the user to set a limit on the allowed size of an HTTP request
  1628.     message body within the context in which the directive is given
  1629.     (server, per-directory, per-file or per-location). If the client
  1630.     request exceeds that limit, the server will return an error
  1631.     response instead of servicing the request. The size of a normal
  1632.     request message body will vary greatly depending on the nature of
  1633.     the resource and the methods allowed on that resource. CGI scripts
  1634.     typically use the message body for retrieving form information.
  1635.     Implementations of the <code>PUT</code> method will require
  1636.     a value at least as large as any representation that the server
  1637.     wishes to accept for that resource.</p>
  1638.  
  1639.     <p>This directive gives the server administrator greater
  1640.     control over abnormal client request behavior, which may be
  1641.     useful for avoiding some forms of denial-of-service
  1642.     attacks.</p>
  1643.  
  1644.     <p>If, for example, you are permitting file upload to a particular
  1645.     location, and wish to limit the size of the uploaded file to 100K,
  1646.     you might use the following directive:</p>
  1647.  
  1648.     <div class="example"><p><code>
  1649.       LimitRequestBody 102400
  1650.     </code></p></div>
  1651.  
  1652.  
  1653. </div>
  1654. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1655. <div class="directive-section"><h2><a name="LimitRequestFields" id="LimitRequestFields">LimitRequestFields</a> <a name="limitrequestfields" id="limitrequestfields">Directive</a></h2>
  1656. <table class="directive">
  1657. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the number of HTTP request header fields that
  1658. will be accepted from the client</td></tr>
  1659. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestFields <var>number</var></code></td></tr>
  1660. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestFields 100</code></td></tr>
  1661. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
  1662. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  1663. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  1664. </table>
  1665.     <p><var>Number</var> is an integer from 0 (meaning unlimited) to
  1666.     32767. The default value is defined by the compile-time
  1667.     constant <code>DEFAULT_LIMIT_REQUEST_FIELDS</code> (100 as
  1668.     distributed).</p>
  1669.  
  1670.     <p>The <code class="directive">LimitRequestFields</code> directive allows
  1671.     the server administrator to modify the limit on the number of
  1672.     request header fields allowed in an HTTP request. A server needs
  1673.     this value to be larger than the number of fields that a normal
  1674.     client request might include. The number of request header fields
  1675.     used by a client rarely exceeds 20, but this may vary among
  1676.     different client implementations, often depending upon the extent
  1677.     to which a user has configured their browser to support detailed
  1678.     content negotiation. Optional HTTP extensions are often expressed
  1679.     using request header fields.</p>
  1680.  
  1681.     <p>This directive gives the server administrator greater
  1682.     control over abnormal client request behavior, which may be
  1683.     useful for avoiding some forms of denial-of-service attacks.
  1684.     The value should be increased if normal clients see an error
  1685.     response from the server that indicates too many fields were
  1686.     sent in the request.</p>
  1687.  
  1688.     <p>For example:</p>
  1689.  
  1690.     <div class="example"><p><code>
  1691.       LimitRequestFields 50
  1692.     </code></p></div>
  1693.  
  1694.  
  1695. </div>
  1696. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1697. <div class="directive-section"><h2><a name="LimitRequestFieldSize" id="LimitRequestFieldSize">LimitRequestFieldSize</a> <a name="limitrequestfieldsize" id="limitrequestfieldsize">Directive</a></h2>
  1698. <table class="directive">
  1699. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the size of the HTTP request header allowed from the
  1700. client</td></tr>
  1701. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestFieldsize <var>bytes</var></code></td></tr>
  1702. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestFieldsize 8190</code></td></tr>
  1703. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
  1704. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  1705. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  1706. </table>
  1707.     <p>This directive specifies the number of <var>bytes</var> from 0
  1708.     to the value of the compile-time constant
  1709.     <code>DEFAULT_LIMIT_REQUEST_FIELDSIZE</code> (8190 as
  1710.     distributed) that will be allowed in an HTTP request
  1711.     header.</p>
  1712.  
  1713.     <p>The <code class="directive">LimitRequestFieldSize</code> directive
  1714.     allows the server administrator to reduce the limit on the allowed
  1715.     size of an HTTP request header field below the normal input buffer
  1716.     size compiled with the server. A server needs this value to be
  1717.     large enough to hold any one header field from a normal client
  1718.     request. The size of a normal request header field will vary
  1719.     greatly among different client implementations, often depending
  1720.     upon the extent to which a user has configured their browser to
  1721.     support detailed content negotiation.</p>
  1722.  
  1723.     <p>This directive gives the server administrator greater
  1724.     control over abnormal client request behavior, which may be
  1725.     useful for avoiding some forms of denial-of-service attacks.</p>
  1726.  
  1727.     <p>For example:</p>
  1728.  
  1729.     <div class="example"><p><code>
  1730.       LimitRequestFieldSize 4094
  1731.     </code></p></div>
  1732.  
  1733.     <div class="note">Under normal conditions, the value should not be changed from
  1734.     the default.</div>
  1735.  
  1736.  
  1737. </div>
  1738. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1739. <div class="directive-section"><h2><a name="LimitRequestLine" id="LimitRequestLine">LimitRequestLine</a> <a name="limitrequestline" id="limitrequestline">Directive</a></h2>
  1740. <table class="directive">
  1741. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limit the size of the HTTP request line that will be accepted
  1742. from the client</td></tr>
  1743. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestLine <var>bytes</var></code></td></tr>
  1744. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestLine 8190</code></td></tr>
  1745. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
  1746. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  1747. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  1748. </table>
  1749.     <p>This directive sets the number of <var>bytes</var> from 0 to
  1750.     the value of the compile-time constant
  1751.     <code>DEFAULT_LIMIT_REQUEST_LINE</code> (8190 as distributed)
  1752.     that will be allowed on the HTTP request-line.</p>
  1753.  
  1754.     <p>The <code class="directive">LimitRequestLine</code> directive allows
  1755.     the server administrator to reduce the limit on the allowed size
  1756.     of a client's HTTP request-line below the normal input buffer size
  1757.     compiled with the server. Since the request-line consists of the
  1758.     HTTP method, URI, and protocol version, the
  1759.     <code class="directive">LimitRequestLine</code> directive places a
  1760.     restriction on the length of a request-URI allowed for a request
  1761.     on the server. A server needs this value to be large enough to
  1762.     hold any of its resource names, including any information that
  1763.     might be passed in the query part of a <code>GET</code> request.</p>
  1764.  
  1765.     <p>This directive gives the server administrator greater
  1766.     control over abnormal client request behavior, which may be
  1767.     useful for avoiding some forms of denial-of-service attacks.</p>
  1768.  
  1769.     <p>For example:</p>
  1770.  
  1771.     <div class="example"><p><code>
  1772.       LimitRequestLine 4094
  1773.     </code></p></div>
  1774.  
  1775.     <div class="note">Under normal conditions, the value should not be changed from
  1776.     the default.</div>
  1777.  
  1778. </div>
  1779. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1780. <div class="directive-section"><h2><a name="LimitXMLRequestBody" id="LimitXMLRequestBody">LimitXMLRequestBody</a> <a name="limitxmlrequestbody" id="limitxmlrequestbody">Directive</a></h2>
  1781. <table class="directive">
  1782. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the size of an XML-based request body</td></tr>
  1783. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitXMLRequestBody <var>bytes</var></code></td></tr>
  1784. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitXMLRequestBody 1000000</code></td></tr>
  1785. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  1786. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
  1787. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  1788. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  1789. </table>
  1790.     <p>Limit (in bytes) on maximum size of an XML-based request
  1791.     body. A value of <code>0</code> will disable any checking.</p>
  1792.  
  1793.     <p>Example:</p>
  1794.  
  1795.     <div class="example"><p><code>
  1796.       LimitXMLRequestBody 0
  1797.     </code></p></div>
  1798.  
  1799.  
  1800. </div>
  1801. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1802. <div class="directive-section"><h2><a name="Location" id="Location"><Location></a> <a name="location" id="location">Directive</a></h2>
  1803. <table class="directive">
  1804. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Applies the enclosed directives only to matching
  1805. URLs</td></tr>
  1806. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Location
  1807.     <var>URL-path</var>|<var>URL</var>> ... </Location></code></td></tr>
  1808. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  1809. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  1810. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  1811. </table>
  1812.     <p>The <code class="directive"><Location></code> directive
  1813.     limits the scope of the enclosed directives by URL. It is similar to the
  1814.     <code class="directive"><a href="#directory"><Directory></a></code>
  1815.     directive, and starts a subsection which is terminated with a
  1816.     <code></Location></code> directive. <code class="directive"><Location></code> sections are processed in the
  1817.     order they appear in the configuration file, after the <code class="directive"><a href="#directory"><Directory></a></code> sections and
  1818.     <code>.htaccess</code> files are read, and after the <code class="directive"><a href="#files"><Files></a></code> sections.</p>
  1819.  
  1820.     <p><code class="directive"><Location></code> sections operate
  1821.     completely outside the filesystem.  This has several consequences.
  1822.     Most importantly, <code class="directive"><Location></code>
  1823.     directives should not be used to control access to filesystem
  1824.     locations.  Since several different URLs may map to the same
  1825.     filesystem location, such access controls may by circumvented.</p>
  1826.  
  1827.     <div class="note"><h3>When to use <code class="directive"><Location></code></h3>
  1828.  
  1829.     <p>Use <code class="directive"><Location></code> to apply
  1830.     directives to content that lives outside the filesystem.  For
  1831.     content that lives in the filesystem, use <code class="directive"><a href="#directory"><Directory></a></code> and <code class="directive"><a href="#files"><Files></a></code>.  An exception is
  1832.     <code><Location /></code>, which is an easy way to 
  1833.     apply a configuration to the entire server.</p>
  1834.     </div>
  1835.  
  1836.     <p>For all origin (non-proxy) requests, the URL to be matched is a
  1837.     URL-path of the form <code>/path/</code>.  No scheme, hostname,
  1838.     port, or query string may be included.  For proxy requests, the
  1839.     URL to be matched is of the form
  1840.     <code>scheme://servername/path</code>, and you must include the
  1841.     prefix.</p>
  1842.  
  1843.     <p>The URL may use wildcards. In a wild-card string, <code>?</code> matches
  1844.     any single character, and <code>*</code> matches any sequences of
  1845.     characters.</p>
  1846.  
  1847.     <p>Extended regular
  1848.     expressions can also be used, with the addition of the
  1849.     <code>~</code> character. For example:</p>
  1850.  
  1851.     <div class="example"><p><code>
  1852.       <Location ~ "/(extra|special)/data">
  1853.     </code></p></div>
  1854.  
  1855.     <p>would match URLs that contained the substring <code>/extra/data</code>
  1856.     or <code>/special/data</code>. The directive <code class="directive"><a href="#locationmatch"><LocationMatch></a></code> behaves
  1857.     identical to the regex version of <code class="directive"><Location></code>.</p>
  1858.  
  1859.     <p>The <code class="directive"><Location></code>
  1860.     functionality is especially useful when combined with the
  1861.     <code class="directive"><a href="#sethandler">SetHandler</a></code>
  1862.     directive. For example, to enable status requests, but allow them
  1863.     only from browsers at <code>foo.com</code>, you might use:</p>
  1864.  
  1865.     <div class="example"><p><code>
  1866.       <Location /status><br />
  1867.       <span class="indent">
  1868.         SetHandler server-status<br />
  1869.         Order Deny,Allow<br />
  1870.         Deny from all<br />
  1871.         Allow from .foo.com<br />
  1872.       </span>
  1873.       </Location>
  1874.     </code></p></div>
  1875.  
  1876.     <div class="note"><h3>Note about / (slash)</h3>
  1877.       <p>The slash character has special meaning depending on where in a
  1878.       URL it appears. People may be used to its behavior in the filesystem
  1879.       where multiple adjacent slashes are frequently collapsed to a single
  1880.       slash (<em>i.e.</em>, <code>/home///foo</code> is the same as
  1881.       <code>/home/foo</code>). In URL-space this is not necessarily true.
  1882.       The <code class="directive"><a href="#locationmatch"><LocationMatch></a></code>
  1883.       directive and the regex version of <code class="directive"><Location></code> require you to explicitly specify multiple
  1884.       slashes if that is your intention.</p>
  1885.  
  1886.       <p>For example, <code><LocationMatch ^/abc></code> would match
  1887.       the request URL <code>/abc</code> but not the request URL <code>
  1888.       //abc</code>. The (non-regex) <code class="directive"><Location></code> directive behaves similarly when used for
  1889.       proxy requests. But when (non-regex) <code class="directive"><Location></code> is used for non-proxy requests it will
  1890.       implicitly match multiple slashes with a single slash. For example,
  1891.       if you specify <code><Location /abc/def></code> and the
  1892.       request is to <code>/abc//def</code> then it will match.</p>
  1893.     </div>
  1894.  
  1895. <h3>See also</h3>
  1896. <ul>
  1897. <li><a href="../sections.html">How <Directory>, <Location>
  1898.     and <Files> sections work</a> for an explanation of how these
  1899.     different sections are combined when a request is received</li>
  1900. </ul>
  1901. </div>
  1902. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1903. <div class="directive-section"><h2><a name="LocationMatch" id="LocationMatch"><LocationMatch></a> <a name="locationmatch" id="locationmatch">Directive</a></h2>
  1904. <table class="directive">
  1905. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Applies the enclosed directives only to regular-expression
  1906. matching URLs</td></tr>
  1907. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><LocationMatch
  1908.     <var>regex</var>> ... </LocationMatch></code></td></tr>
  1909. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  1910. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  1911. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  1912. </table>
  1913.     <p>The <code class="directive"><LocationMatch></code> directive
  1914.     limits the scope of the enclosed directives by URL, in an identical manner
  1915.     to <code class="directive"><a href="#location"><Location></a></code>. However,
  1916.     it takes a regular expression as an argument instead of a simple
  1917.     string. For example:</p>
  1918.  
  1919.     <div class="example"><p><code>
  1920.       <LocationMatch "/(extra|special)/data">
  1921.     </code></p></div>
  1922.  
  1923.     <p>would match URLs that contained the substring <code>/extra/data</code>
  1924.     or <code>/special/data</code>.</p>
  1925.  
  1926. <h3>See also</h3>
  1927. <ul>
  1928. <li><a href="../sections.html">How <Directory>, <Location>
  1929.     and <Files> sections work</a> for an explanation of how these
  1930.     different sections are combined when a request is received</li>
  1931. </ul>
  1932. </div>
  1933. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1934. <div class="directive-section"><h2><a name="LogLevel" id="LogLevel">LogLevel</a> <a name="loglevel" id="loglevel">Directive</a></h2>
  1935. <table class="directive">
  1936. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Controls the verbosity of the ErrorLog</td></tr>
  1937. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LogLevel <var>level</var></code></td></tr>
  1938. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LogLevel warn</code></td></tr>
  1939. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  1940. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  1941. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  1942. </table>
  1943.     <p><code class="directive">LogLevel</code> adjusts the verbosity of the
  1944.     messages recorded in the error logs (see <code class="directive"><a href="#errorlog">ErrorLog</a></code> directive). The following
  1945.     <var>level</var>s are available, in order of decreasing
  1946.     significance:</p>
  1947.  
  1948.     <table class="bordered">
  1949.       <tr>
  1950.         <th><strong>Level</strong> </th>
  1951.  
  1952.         <th><strong>Description</strong> </th>
  1953.  
  1954.         <th><strong>Example</strong> </th>
  1955.       </tr>
  1956.  
  1957.       <tr>
  1958.         <td><code>emerg</code> </td>
  1959.  
  1960.         <td>Emergencies - system is unusable.</td>
  1961.  
  1962.         <td>"Child cannot open lock file. Exiting"</td>
  1963.       </tr>
  1964.  
  1965.       <tr>
  1966.         <td><code>alert</code> </td>
  1967.  
  1968.         <td>Action must be taken immediately.</td>
  1969.  
  1970.         <td>"getpwuid: couldn't determine user name from uid"</td>
  1971.       </tr>
  1972.  
  1973.       <tr>
  1974.         <td><code>crit</code> </td>
  1975.  
  1976.         <td>Critical Conditions.</td>
  1977.  
  1978.         <td>"socket: Failed to get a socket, exiting child"</td>
  1979.       </tr>
  1980.  
  1981.       <tr>
  1982.         <td><code>error</code> </td>
  1983.  
  1984.         <td>Error conditions.</td>
  1985.  
  1986.         <td>"Premature end of script headers"</td>
  1987.       </tr>
  1988.  
  1989.       <tr>
  1990.         <td><code>warn</code> </td>
  1991.  
  1992.         <td>Warning conditions.</td>
  1993.  
  1994.         <td>"child process 1234 did not exit, sending another
  1995.         SIGHUP"</td>
  1996.       </tr>
  1997.  
  1998.       <tr>
  1999.         <td><code>notice</code> </td>
  2000.  
  2001.         <td>Normal but significant condition.</td>
  2002.  
  2003.         <td>"httpd: caught SIGBUS, attempting to dump core in
  2004.         ..."</td>
  2005.       </tr>
  2006.  
  2007.       <tr>
  2008.         <td><code>info</code> </td>
  2009.  
  2010.         <td>Informational.</td>
  2011.  
  2012.         <td>"Server seems busy, (you may need to increase
  2013.         StartServers, or Min/MaxSpareServers)..."</td>
  2014.       </tr>
  2015.  
  2016.       <tr>
  2017.         <td><code>debug</code> </td>
  2018.  
  2019.         <td>Debug-level messages</td>
  2020.  
  2021.         <td>"Opening config file ..."</td>
  2022.       </tr>
  2023.     </table>
  2024.  
  2025.     <p>When a particular level is specified, messages from all
  2026.     other levels of higher significance will be reported as well.
  2027.     <em>E.g.</em>, when <code>LogLevel info</code> is specified,
  2028.     then messages with log levels of <code>notice</code> and
  2029.     <code>warn</code> will also be posted.</p>
  2030.  
  2031.     <p>Using a level of at least <code>crit</code> is
  2032.     recommended.</p>
  2033.  
  2034.     <p>For example:</p>
  2035.  
  2036.     <div class="example"><p><code>
  2037.       LogLevel notice
  2038.     </code></p></div>
  2039.  
  2040.     <div class="note"><h3>Note</h3>
  2041.       <p>When logging to a regular file messages of the level
  2042.       <code>notice</code> cannot be suppressed and thus are always
  2043.       logged. However, this doesn't apply when logging is done
  2044.       using <code>syslog</code>.</p>
  2045.     </div>
  2046.  
  2047. </div>
  2048. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  2049. <div class="directive-section"><h2><a name="MaxKeepAliveRequests" id="MaxKeepAliveRequests">MaxKeepAliveRequests</a> <a name="maxkeepaliverequests" id="maxkeepaliverequests">Directive</a></h2>
  2050. <table class="directive">
  2051. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of requests allowed on a persistent
  2052. connection</td></tr>
  2053. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxKeepAliveRequests <var>number</var></code></td></tr>
  2054. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxKeepAliveRequests 100</code></td></tr>
  2055. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  2056. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  2057. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  2058. </table>
  2059.     <p>The <code class="directive">MaxKeepAliveRequests</code> directive
  2060.     limits the number of requests allowed per connection when
  2061.     <code class="directive"><a href="#keepalive">KeepAlive</a></code> is on. If it is
  2062.     set to <code>0</code>, unlimited requests will be allowed. We
  2063.     recommend that this setting be kept to a high value for maximum
  2064.     server performance.</p>
  2065.  
  2066.     <p>For example:</p>
  2067.  
  2068.     <div class="example"><p><code>
  2069.       MaxKeepAliveRequests 500
  2070.     </code></p></div>
  2071.  
  2072. </div>
  2073. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  2074. <div class="directive-section"><h2><a name="NameVirtualHost" id="NameVirtualHost">NameVirtualHost</a> <a name="namevirtualhost" id="namevirtualhost">Directive</a></h2>
  2075. <table class="directive">
  2076. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Designates an IP address for name-virtual
  2077. hosting</td></tr>
  2078. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>NameVirtualHost <var>addr</var>[:<var>port</var>]</code></td></tr>
  2079. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
  2080. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  2081. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  2082. </table>
  2083.     <p>The <code class="directive">NameVirtualHost</code> directive is a
  2084.     required directive if you want to configure <a href="../vhosts/">name-based virtual hosts</a>.</p>
  2085.  
  2086.     <p>Although <var>addr</var> can be hostname it is recommended
  2087.     that you always use an IP address, e.g.</p>
  2088.  
  2089.     <div class="example"><p><code>
  2090.       NameVirtualHost 111.22.33.44
  2091.     </code></p></div>
  2092.  
  2093.     <p>With the <code class="directive">NameVirtualHost</code> directive you
  2094.     specify the IP address on which the server will receive requests
  2095.     for the name-based virtual hosts. This will usually be the address
  2096.     to which your name-based virtual host names resolve. In cases
  2097.     where a firewall or other proxy receives the requests and forwards
  2098.     them on a different IP address to the server, you must specify the
  2099.     IP address of the physical interface on the machine which will be
  2100.     servicing the requests. If you have multiple name-based hosts on
  2101.     multiple addresses, repeat the directive for each address.</p>
  2102.  
  2103.     <div class="note"><h3>Note</h3>
  2104.       <p>Note, that the "main server" and any <code>_default_</code> servers
  2105.       will <strong>never</strong> be served for a request to a
  2106.       <code class="directive">NameVirtualHost</code> IP Address (unless for some
  2107.       reason you specify <code class="directive">NameVirtualHost</code> but then
  2108.       don't define any <code class="directive">VirtualHost</code>s for that
  2109.       address).</p>
  2110.     </div>
  2111.  
  2112.     <p>Optionally you can specify a port number on which the
  2113.     name-based virtual hosts should be used, e.g.</p>
  2114.  
  2115.     <div class="example"><p><code>
  2116.       NameVirtualHost 111.22.33.44:8080
  2117.     </code></p></div>
  2118.  
  2119.     <p>IPv6 addresses must be enclosed in square brackets, as shown
  2120.     in the following example:</p>
  2121.  
  2122.     <div class="example"><p><code>
  2123.       NameVirtualHost [fe80::a00:20ff:fea7:ccea]:8080
  2124.     </code></p></div>
  2125.  
  2126.     <p>To receive requests on all interfaces, you can use an argument of
  2127.     <code>*</code></p>
  2128.  
  2129.     <div class="example"><p><code>
  2130.       NameVirtualHost *
  2131.     </code></p></div>
  2132.  
  2133.     <div class="note"><h3>Argument to <code class="directive"><VirtualHost></code>
  2134.       directive</h3>
  2135.       <p>Note that the argument to the <code class="directive"><VirtualHost></code> directive must
  2136.       exactly match the argument to the <code class="directive">NameVirtualHost</code> directive.</p>
  2137.  
  2138.       <div class="example"><p><code>
  2139.         NameVirtualHost 1.2.3.4<br />
  2140.         <VirtualHost 1.2.3.4><br />
  2141.         # ...<br />
  2142.         </VirtualHost><br />
  2143.       </code></p></div>
  2144.     </div>
  2145.  
  2146. <h3>See also</h3>
  2147. <ul>
  2148. <li><a href="../vhosts/">Virtual Hosts
  2149. documentation</a></li>
  2150. </ul>
  2151. </div>
  2152. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  2153. <div class="directive-section"><h2><a name="Options" id="Options">Options</a> <a name="options" id="options">Directive</a></h2>
  2154. <table class="directive">
  2155. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures what features are available in a particular
  2156. directory</td></tr>
  2157. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Options
  2158.     [+|-]<var>option</var> [[+|-]<var>option</var>] ...</code></td></tr>
  2159. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Options All</code></td></tr>
  2160. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  2161. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
  2162. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  2163. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  2164. </table>
  2165.     <p>The <code class="directive">Options</code> directive controls which
  2166.     server features are available in a particular directory.</p>
  2167.  
  2168.     <p><var>option</var> can be set to <code>None</code>, in which
  2169.     case none of the extra features are enabled, or one or more of
  2170.     the following:</p>
  2171.  
  2172.     <dl>
  2173.       <dt><code>All</code></dt>
  2174.  
  2175.       <dd>All options except for <code>MultiViews</code>. This is the default
  2176.       setting.</dd>
  2177.  
  2178.       <dt><code>ExecCGI</code></dt>
  2179.  
  2180.       <dd>
  2181.       Execution of CGI scripts using <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>
  2182.       is permitted.</dd>
  2183.  
  2184.       <dt><code>FollowSymLinks</code></dt>
  2185.  
  2186.       <dd>
  2187.  
  2188.       The server will follow symbolic links in this directory.
  2189.       <div class="note">
  2190.       <p>Even though the server follows the symlink it does <em>not</em>
  2191.       change the pathname used to match against <code class="directive"><a href="#directory"><Directory></a></code> sections.</p>
  2192.       <p>Note also, that this option <strong>gets ignored</strong> if set
  2193.       inside a <code class="directive"><a href="#location"><Location></a></code>
  2194.       section.</p>
  2195.       </div></dd>
  2196.  
  2197.       <dt><code>Includes</code></dt>
  2198.  
  2199.       <dd>
  2200.       Server-side includes provided by <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>
  2201.       are permitted.</dd>
  2202.  
  2203.       <dt><code>IncludesNOEXEC</code></dt>
  2204.  
  2205.       <dd>
  2206.  
  2207.       Server-side includes are permitted, but the <code>#exec
  2208.       cmd</code> and <code>#exec cgi</code> are disabled. It is still
  2209.       possible to <code>#include virtual</code> CGI scripts from
  2210.       <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code>ed
  2211.       directories.</dd>
  2212.  
  2213.       <dt><code>Indexes</code></dt>
  2214.  
  2215.       <dd>
  2216.       If a URL which maps to a directory is requested, and there
  2217.       is no <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>
  2218.       (<em>e.g.</em>, <code>index.html</code>) in that directory, then
  2219.       <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> will return a formatted listing
  2220.       of the directory.</dd>
  2221.  
  2222.       <dt><code>MultiViews</code></dt>
  2223.  
  2224.       <dd>
  2225.       <a href="../content-negotiation.html">Content negotiated</a>
  2226.       "MultiViews" are allowed using
  2227.       <code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code>.</dd>
  2228.  
  2229.       <dt><code>SymLinksIfOwnerMatch</code></dt>
  2230.  
  2231.       <dd>The server will only follow symbolic links for which the
  2232.       target file or directory is owned by the same user id as the
  2233.       link.
  2234.  
  2235.       <div class="note"><h3>Note</h3> This option gets ignored if
  2236.       set inside a <code class="directive"><a href="#location"><Location></a></code> section.</div>
  2237.       </dd>
  2238.     </dl>
  2239.  
  2240.     <p>Normally, if multiple <code class="directive">Options</code> could
  2241.     apply to a directory, then the most specific one is used and
  2242.     others are ignored; the options are not merged. (See <a href="../sections.html#mergin">how sections are merged</a>.)
  2243.     However if <em>all</em> the options on the
  2244.     <code class="directive">Options</code> directive are preceded by a
  2245.     <code>+</code> or <code>-</code> symbol, the options are
  2246.     merged. Any options preceded by a <code>+</code> are added to the
  2247.     options currently in force, and any options preceded by a
  2248.     <code>-</code> are removed from the options currently in
  2249.     force. </p>
  2250.  
  2251.     <p>For example, without any <code>+</code> and <code>-</code> symbols:</p>
  2252.  
  2253.     <div class="example"><p><code>
  2254.       <Directory /web/docs><br />
  2255.       <span class="indent">
  2256.         Options Indexes FollowSymLinks<br />
  2257.       </span>
  2258.       </Directory><br />
  2259.       <br />
  2260.       <Directory /web/docs/spec><br />
  2261.       <span class="indent">
  2262.         Options Includes<br />
  2263.       </span>
  2264.       </Directory>
  2265.     </code></p></div>
  2266.  
  2267.     <p>then only <code>Includes</code> will be set for the
  2268.     <code>/web/docs/spec</code> directory. However if the second
  2269.     <code class="directive">Options</code> directive uses the <code>+</code> and
  2270.     <code>-</code> symbols:</p>
  2271.  
  2272.     <div class="example"><p><code>
  2273.       <Directory /web/docs><br />
  2274.       <span class="indent">
  2275.         Options Indexes FollowSymLinks<br />
  2276.       </span>
  2277.       </Directory><br />
  2278.       <br />
  2279.       <Directory /web/docs/spec><br />
  2280.       <span class="indent">
  2281.         Options +Includes -Indexes<br />
  2282.       </span>
  2283.       </Directory>
  2284.     </code></p></div>
  2285.  
  2286.     <p>then the options <code>FollowSymLinks</code> and
  2287.     <code>Includes</code> are set for the <code>/web/docs/spec</code>
  2288.     directory.</p>
  2289.  
  2290.  
  2291.     <div class="note"><h3>Note</h3>
  2292.       <p>Using <code>-IncludesNOEXEC</code> or
  2293.       <code>-Includes</code> disables server-side includes completely
  2294.       regardless of the previous setting.</p>
  2295.     </div>
  2296.  
  2297.     <p>The default in the absence of any other settings is
  2298.     <code>All</code>.</p>
  2299.  
  2300. </div>
  2301. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  2302. <div class="directive-section"><h2><a name="Require" id="Require">Require</a> <a name="require" id="require">Directive</a></h2>
  2303. <table class="directive">
  2304. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Selects which authenticated users can access
  2305. a resource</td></tr>
  2306. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Require <var>entity-name</var> [<var>entity-name</var>] ...</code></td></tr>
  2307. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
  2308. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
  2309. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  2310. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  2311. </table>
  2312.     <p>This directive selects which authenticated users can access
  2313.     a directory. The allowed syntaxes are:</p>
  2314.  
  2315.     <dl>
  2316.       <dt><code>Require user <var>userid</var> [<var>userid</var>]
  2317.       ...</code></dt>
  2318.       <dd>Only the named users can access the resource.</dd>
  2319.  
  2320.       <dt><code>Require group <var>group-name</var> [<var>group-name</var>]
  2321.       ...</code></dt>
  2322.       <dd>Only users in the named groups can access the resource.</dd>
  2323.  
  2324.       <dt><code>Require valid-user</code></dt>
  2325.       <dd>All valid users can access the resource.</dd>
  2326.     </dl>
  2327.  
  2328.     <p><code class="directive">Require</code> must be accompanied by
  2329.     <code class="directive"><a href="#authname">AuthName</a></code> and <code class="directive"><a href="#authtype">AuthType</a></code> directives, and directives such
  2330.     as <code class="directive"><a href="../mod/mod_auth.html#authuserfile">AuthUserFile</a></code>
  2331.     and <code class="directive"><a href="../mod/mod_auth.html#authgroupfile">AuthGroupFile</a></code> (to
  2332.     define users and groups) in order to work correctly. Example:</p>
  2333.  
  2334.     <div class="example"><p><code>
  2335.        AuthType Basic<br />
  2336.        AuthName "Restricted Directory"<br />
  2337.        AuthUserFile /web/users<br />
  2338.        AuthGroupFile /web/groups<br />
  2339.        Require group admin
  2340.     </code></p></div>
  2341.  
  2342.     <p>Access controls which are applied in this way are effective for
  2343.     <strong>all</strong> methods. <strong>This is what is normally
  2344.     desired.</strong> If you wish to apply access controls only to
  2345.     specific methods, while leaving other methods unprotected, then
  2346.     place the <code class="directive">Require</code> statement into a
  2347.     <code class="directive"><a href="#limit"><Limit></a></code>
  2348.     section.</p>
  2349.  
  2350. <h3>See also</h3>
  2351. <ul>
  2352. <li><code class="directive"><a href="#satisfy">Satisfy</a></code></li>
  2353. <li><code class="module"><a href="../mod/mod_access.html">mod_access</a></code></li>
  2354. </ul>
  2355. </div>
  2356. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  2357. <div class="directive-section"><h2><a name="RLimitCPU" id="RLimitCPU">RLimitCPU</a> <a name="rlimitcpu" id="rlimitcpu">Directive</a></h2>
  2358. <table class="directive">
  2359. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the CPU consumption of processes launched
  2360. by Apache children</td></tr>
  2361. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RLimitCPU <var>seconds</var>|max [<var>seconds</var>|max]</code></td></tr>
  2362. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
  2363. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  2364. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
  2365. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  2366. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  2367. </table>
  2368.     <p>Takes 1 or 2 parameters. The first parameter sets the soft
  2369.     resource limit for all processes and the second parameter sets
  2370.     the maximum resource limit. Either parameter can be a number,
  2371.     or <code>max</code> to indicate to the server that the limit should
  2372.     be set to the maximum allowed by the operating system
  2373.     configuration. Raising the maximum resource limit requires that
  2374.     the server is running as <code>root</code>, or in the initial startup
  2375.     phase.</p>
  2376.  
  2377.     <p>This applies to processes forked off from Apache children
  2378.     servicing requests, not the Apache children themselves. This
  2379.     includes CGI scripts and SSI exec commands, but not any
  2380.     processes forked off from the Apache parent such as piped
  2381.     logs.</p>
  2382.  
  2383.     <p>CPU resource limits are expressed in seconds per
  2384.     process.</p>
  2385.  
  2386. <h3>See also</h3>
  2387. <ul>
  2388. <li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li>
  2389. <li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li>
  2390. </ul>
  2391. </div>
  2392. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  2393. <div class="directive-section"><h2><a name="RLimitMEM" id="RLimitMEM">RLimitMEM</a> <a name="rlimitmem" id="rlimitmem">Directive</a></h2>
  2394. <table class="directive">
  2395. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the memory consumption of processes launched
  2396. by Apache children</td></tr>
  2397. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RLimitMEM <var>bytes</var>|max [<var>bytes</var>|max]</code></td></tr>
  2398. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
  2399. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  2400. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
  2401. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  2402. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  2403. </table>
  2404.     <p>Takes 1 or 2 parameters. The first parameter sets the soft
  2405.     resource limit for all processes and the second parameter sets
  2406.     the maximum resource limit. Either parameter can be a number,
  2407.     or <code>max</code> to indicate to the server that the limit should
  2408.     be set to the maximum allowed by the operating system
  2409.     configuration. Raising the maximum resource limit requires that
  2410.     the server is running as <code>root</code>, or in the initial startup
  2411.     phase.</p>
  2412.  
  2413.     <p>This applies to processes forked off from Apache children
  2414.     servicing requests, not the Apache children themselves. This
  2415.     includes CGI scripts and SSI exec commands, but not any
  2416.     processes forked off from the Apache parent such as piped
  2417.     logs.</p>
  2418.  
  2419.     <p>Memory resource limits are expressed in bytes per
  2420.     process.</p>
  2421.  
  2422. <h3>See also</h3>
  2423. <ul>
  2424. <li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li>
  2425. <li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li>
  2426. </ul>
  2427. </div>
  2428. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  2429. <div class="directive-section"><h2><a name="RLimitNPROC" id="RLimitNPROC">RLimitNPROC</a> <a name="rlimitnproc" id="rlimitnproc">Directive</a></h2>
  2430. <table class="directive">
  2431. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the number of processes that can be launched by
  2432. processes launched by Apache children</td></tr>
  2433. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RLimitNPROC <var>number</var>|max [<var>number</var>|max]</code></td></tr>
  2434. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
  2435. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  2436. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
  2437. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  2438. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  2439. </table>
  2440.     <p>Takes 1 or 2 parameters. The first parameter sets the soft
  2441.     resource limit for all processes and the second parameter sets
  2442.     the maximum resource limit. Either parameter can be a number,
  2443.     or <code>max</code> to indicate to the server that the limit
  2444.     should be set to the maximum allowed by the operating system
  2445.     configuration. Raising the maximum resource limit requires that
  2446.     the server is running as <code>root</code>, or in the initial startup
  2447.     phase.</p>
  2448.  
  2449.     <p>This applies to processes forked off from Apache children
  2450.     servicing requests, not the Apache children themselves. This
  2451.     includes CGI scripts and SSI exec commands, but not any
  2452.     processes forked off from the Apache parent such as piped
  2453.     logs.</p>
  2454.  
  2455.     <p>Process limits control the number of processes per user.</p>
  2456.  
  2457.     <div class="note"><h3>Note</h3>
  2458.       <p>If CGI processes are <strong>not</strong> running
  2459.       under userids other than the web server userid, this directive
  2460.       will limit the number of processes that the server itself can
  2461.       create. Evidence of this situation will be indicated by
  2462.       <strong><code>cannot fork</code></strong> messages in the
  2463.       <code>error_log</code>.</p>
  2464.     </div>
  2465.  
  2466. <h3>See also</h3>
  2467. <ul>
  2468. <li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li>
  2469. <li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li>
  2470. </ul>
  2471. </div>
  2472. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  2473. <div class="directive-section"><h2><a name="Satisfy" id="Satisfy">Satisfy</a> <a name="satisfy" id="satisfy">Directive</a></h2>
  2474. <table class="directive">
  2475. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Interaction between host-level access control and
  2476. user authentication</td></tr>
  2477. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Satisfy Any|All</code></td></tr>
  2478. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Satisfy All</code></td></tr>
  2479. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
  2480. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
  2481. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  2482. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  2483. </table>
  2484.     <p>Access policy if both <code class="directive"><a href="../mod/mod_access.html#allow">Allow</a></code> and <code class="directive"><a href="#require">Require</a></code> used. The parameter can be
  2485.     either <code>All</code> or <code>Any</code>. This directive is only
  2486.     useful if access to a particular area is being restricted by both
  2487.     username/password <em>and</em> client host address. In this case
  2488.     the default behavior (<code>All</code>) is to require that the client
  2489.     passes the address access restriction <em>and</em> enters a valid
  2490.     username and password. With the <code>Any</code> option the client will be
  2491.     granted access if they either pass the host restriction or enter a
  2492.     valid username and password. This can be used to password restrict
  2493.     an area, but to let clients from particular addresses in without
  2494.     prompting for a password.</p>
  2495.  
  2496.     <p>For example, if you wanted to let people on your network have
  2497.     unrestricted access to a portion of your website, but require that
  2498.     people outside of your network provide a password, you could use a
  2499.     configuration similar to the following:</p>
  2500.  
  2501.     <div class="example"><p><code>
  2502.       Require valid-user<br />
  2503.       Allow from 192.168.1<br />
  2504.       Satisfy Any
  2505.     </code></p></div>
  2506.  
  2507.  
  2508. <h3>See also</h3>
  2509. <ul>
  2510. <li><code class="directive"><a href="../mod/mod_access.html#allow">Allow</a></code></li>
  2511. <li><code class="directive"><a href="#require">Require</a></code></li>
  2512. </ul>
  2513. </div>
  2514. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  2515. <div class="directive-section"><h2><a name="ScriptInterpreterSource" id="ScriptInterpreterSource">ScriptInterpreterSource</a> <a name="scriptinterpretersource" id="scriptinterpretersource">Directive</a></h2>
  2516. <table class="directive">
  2517. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Technique for locating the interpreter for CGI
  2518. scripts</td></tr>
  2519. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ScriptInterpreterSource Registry|Registry-Strict|Script</code></td></tr>
  2520. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ScriptInterpreterSource Script</code></td></tr>
  2521. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  2522. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
  2523. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  2524. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  2525. <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Win32 only;
  2526. option <code>Registry-Strict</code> is available in Apache 2.0 and
  2527. later</td></tr>
  2528. </table>
  2529.     <p>This directive is used to control how Apache finds the
  2530.     interpreter used to run CGI scripts. The default setting is
  2531.     <code>Script</code>. This causes Apache to use the interpreter pointed to
  2532.     by the shebang line (first line, starting with <code>#!</code>) in the
  2533.     script. On Win32 systems this line usually looks like:</p>
  2534.  
  2535.     <div class="example"><p><code>
  2536.       #!C:/Perl/bin/perl.exe
  2537.     </code></p></div>
  2538.  
  2539.     <p>or, if <code>perl</code> is in the <code>PATH</code>, simply:</p>
  2540.  
  2541.     <div class="example"><p><code>
  2542.       #!perl
  2543.     </code></p></div>
  2544.  
  2545.     <p>Setting <code>ScriptInterpreterSource Registry</code> will
  2546.     cause the Windows Registry tree <code>HKEY_CLASSES_ROOT</code> to be
  2547.     searched using the script file extension (e.g., <code>.pl</code>) as a
  2548.     search key. The command defined by the registry subkey
  2549.     <code>Shell\ExecCGI\Command</code> or, if it does not exist, by the subkey
  2550.     <code>Shell\Open\Command</code> is used to open the script file. If the
  2551.     registry keys cannot be found, Apache falls back to the behavior of the
  2552.     <code>Script</code> option.</p>
  2553.  
  2554.     <div class="warning"><h3>Security</h3>
  2555.     <p>Be careful when using <code>ScriptInterpreterSource
  2556.     Registry</code> with <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code>'ed directories, because
  2557.     Apache will try to execute <strong>every</strong> file within this
  2558.     directory. The <code>Registry</code> setting may cause undesired
  2559.     program calls on files which are typically not executed. For
  2560.     example, the default open command on <code>.htm</code> files on
  2561.     most Windows systems will execute Microsoft Internet Explorer, so
  2562.     any HTTP request for an <code>.htm</code> file existing within the
  2563.     script directory would start the browser in the background on the
  2564.     server. This is a good way to crash your system within a minute or
  2565.     so.</p>
  2566.     </div>
  2567.  
  2568.     <p>The option <code>Registry-Strict</code> which is new in Apache
  2569.     2.0 does the same thing as <code>Registry</code> but uses only the
  2570.     subkey <code>Shell\ExecCGI\Command</code>. The
  2571.     <code>ExecCGI</code> key is not a common one. It must be
  2572.     configured manually in the windows registry and hence prevents
  2573.     accidental program calls on your system.</p>
  2574.  
  2575. </div>
  2576. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  2577. <div class="directive-section"><h2><a name="ServerAdmin" id="ServerAdmin">ServerAdmin</a> <a name="serveradmin" id="serveradmin">Directive</a></h2>
  2578. <table class="directive">
  2579. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Email address that the server includes in error
  2580. messages sent to the client</td></tr>
  2581. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerAdmin <var>email-address</var></code></td></tr>
  2582. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  2583. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  2584. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  2585. </table>
  2586.     <p>The <code class="directive">ServerAdmin</code> sets the e-mail address
  2587.     that the server includes in any error messages it returns to the
  2588.     client.</p>
  2589.  
  2590.     <p>It may be worth setting up a dedicated address for this, e.g.</p>
  2591.  
  2592.     <div class="example"><p><code>
  2593.       ServerAdmin www-admin@foo.example.com
  2594.     </code></p></div>
  2595.     <p>as users do not always mention that they are talking about the
  2596.     server!</p>
  2597.  
  2598. </div>
  2599. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  2600. <div class="directive-section"><h2><a name="ServerAlias" id="ServerAlias">ServerAlias</a> <a name="serveralias" id="serveralias">Directive</a></h2>
  2601. <table class="directive">
  2602. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Alternate names for a host used when matching requests
  2603. to name-virtual hosts</td></tr>
  2604. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerAlias <var>hostname</var> [<var>hostname</var>] ...</code></td></tr>
  2605. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>virtual host</td></tr>
  2606. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  2607. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  2608. </table>
  2609.     <p>The <code class="directive">ServerAlias</code> directive sets the
  2610.     alternate names for a host, for use with <a href="../vhosts/name-based.html">name-based virtual hosts</a>.</p>
  2611.  
  2612.     <div class="example"><p><code>
  2613.       <VirtualHost *><br />
  2614.       ServerName server.domain.com<br />
  2615.       ServerAlias server server2.domain.com server2<br />
  2616.       # ...<br />
  2617.       </VirtualHost>
  2618.     </code></p></div>
  2619.  
  2620. <h3>See also</h3>
  2621. <ul>
  2622. <li><a href="../vhosts/">Apache Virtual Host documentation</a></li>
  2623. </ul>
  2624. </div>
  2625. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  2626. <div class="directive-section"><h2><a name="ServerName" id="ServerName">ServerName</a> <a name="servername" id="servername">Directive</a></h2>
  2627. <table class="directive">
  2628. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Hostname and port that the server uses to identify
  2629. itself</td></tr>
  2630. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerName <var>fully-qualified-domain-name</var>[:<var>port</var>]</code></td></tr>
  2631. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
  2632. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  2633. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  2634. <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>In version 2.0, this
  2635.      directive supersedes the functionality of the <code class="directive">Port</code>
  2636.      directive from version 1.3.</td></tr>
  2637. </table>
  2638.     <p>The <code class="directive">ServerName</code> directive sets the hostname and
  2639.     port that the server uses to identify itself.  This is used when
  2640.     creating redirection URLs. For example, if the name of the
  2641.     machine hosting the webserver is <code>simple.example.com</code>,
  2642.     but the machine also has the DNS alias <code>www.example.com</code>
  2643.     and you wish the webserver to be so identified, the following
  2644.     directive should be used:</p>
  2645.  
  2646.     <div class="example"><p><code>
  2647.       ServerName www.example.com:80
  2648.     </code></p></div>
  2649.  
  2650.     <p>If no <code class="directive">ServerName</code> is specified, then the
  2651.     server attempts to deduce the hostname by performing a reverse
  2652.     lookup on the IP address. If no port is specified in the
  2653.     servername, then the server will use the port from the incoming
  2654.     request. For optimal reliability and predictability, you should
  2655.     specify an explicit hostname and port using the
  2656.     <code class="directive">ServerName</code> directive.</p>
  2657.  
  2658.     <p>If you are using <a href="../vhosts/name-based.html">name-based virtual hosts</a>,
  2659.     the <code class="directive">ServerName</code> inside a
  2660.     <code class="directive"><a href="#virtualhost"><VirtualHost></a></code>
  2661.     section specifies what hostname must appear in the request's
  2662.     <code>Host:</code> header to match this virtual host.</p>
  2663.  
  2664.     <p>See the description of the
  2665.     <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> directive for
  2666.     settings which determine whether self-referential URL's (e.g., by the
  2667.     <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code> module) will refer to the
  2668.     specified port, or to the port number given in the client's request.
  2669.     </p>
  2670.  
  2671. <h3>See also</h3>
  2672. <ul>
  2673. <li><a href="../dns-caveats.html">Issues Regarding DNS and
  2674. Apache</a></li>
  2675. <li><a href="../vhosts/">Apache virtual host
  2676.     documentation</a></li>
  2677. <li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
  2678. <li><code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code></li>
  2679. <li><code class="directive"><a href="#serveralias">ServerAlias</a></code></li>
  2680. </ul>
  2681. </div>
  2682. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  2683. <div class="directive-section"><h2><a name="ServerPath" id="ServerPath">ServerPath</a> <a name="serverpath" id="serverpath">Directive</a></h2>
  2684. <table class="directive">
  2685. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Legacy URL pathname for a name-based virtual host that
  2686. is accessed by an incompatible browser</td></tr>
  2687. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerPath <var>URL-path</var></code></td></tr>
  2688. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>virtual host</td></tr>
  2689. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  2690. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  2691. </table>
  2692.     <p>The <code class="directive">ServerPath</code> directive sets the legacy
  2693.     URL pathname for a host, for use with <a href="../vhosts/">name-based virtual hosts</a>.</p>
  2694.  
  2695. <h3>See also</h3>
  2696. <ul>
  2697. <li><a href="../vhosts/">Apache Virtual Host documentation</a></li>
  2698. </ul>
  2699. </div>
  2700. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  2701. <div class="directive-section"><h2><a name="ServerRoot" id="ServerRoot">ServerRoot</a> <a name="serverroot" id="serverroot">Directive</a></h2>
  2702. <table class="directive">
  2703. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Base directory for the server installation</td></tr>
  2704. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerRoot <var>directory-path</var></code></td></tr>
  2705. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerRoot /usr/local/apache</code></td></tr>
  2706. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
  2707. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  2708. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  2709. </table>
  2710.     <p>The <code class="directive">ServerRoot</code> directive sets the
  2711.     directory in which the server lives. Typically it will contain the
  2712.     subdirectories <code>conf/</code> and <code>logs/</code>. Relative
  2713.     paths for other configuration files are taken as relative to this
  2714.     directory.</p>
  2715.  
  2716.     <div class="example"><h3>Example</h3><p><code>
  2717.       ServerRoot /home/httpd
  2718.     </code></p></div>
  2719.  
  2720.  
  2721. <h3>See also</h3>
  2722. <ul>
  2723. <li><a href="../invoking.html">the <code>-d</code>
  2724.     option to <code>httpd</code></a></li>
  2725. <li><a href="../misc/security_tips.html#serverroot">the
  2726.     security tips</a> for information on how to properly set
  2727.     permissions on the <code class="directive">ServerRoot</code></li>
  2728. </ul>
  2729. </div>
  2730. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  2731. <div class="directive-section"><h2><a name="ServerSignature" id="ServerSignature">ServerSignature</a> <a name="serversignature" id="serversignature">Directive</a></h2>
  2732. <table class="directive">
  2733. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures the footer on server-generated documents</td></tr>
  2734. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerSignature On|Off|EMail</code></td></tr>
  2735. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerSignature Off</code></td></tr>
  2736. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  2737. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
  2738. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  2739. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  2740. </table>
  2741.     <p>The <code class="directive">ServerSignature</code> directive allows the
  2742.     configuration of a trailing footer line under server-generated
  2743.     documents (error messages, <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> ftp directory
  2744.     listings, <code class="module"><a href="../mod/mod_info.html">mod_info</a></code> output, ...). The reason why you
  2745.     would want to enable such a footer line is that in a chain of proxies,
  2746.     the user often has no possibility to tell which of the chained servers
  2747.     actually produced a returned error message.</p>
  2748.  
  2749.     <p>The <code>Off</code>
  2750.     setting, which is the default, suppresses the footer line (and is
  2751.     therefore compatible with the behavior of Apache-1.2 and
  2752.     below). The <code>On</code> setting simply adds a line with the
  2753.     server version number and <code class="directive"><a href="#servername">ServerName</a></code> of the serving virtual host,
  2754.     and the <code>EMail</code> setting additionally creates a
  2755.     "mailto:" reference to the <code class="directive"><a href="#serveradmin">ServerAdmin</a></code> of the referenced
  2756.     document.</p>
  2757.  
  2758.     <p>After version 2.0.44, the details of the server version number
  2759.     presented are controlled by the <code class="directive"><a href="#servertokens">ServerTokens</a></code> directive.</p>
  2760.  
  2761. <h3>See also</h3>
  2762. <ul>
  2763. <li><code class="directive"><a href="#servertokens">ServerTokens</a></code></li>
  2764. </ul>
  2765. </div>
  2766. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  2767. <div class="directive-section"><h2><a name="ServerTokens" id="ServerTokens">ServerTokens</a> <a name="servertokens" id="servertokens">Directive</a></h2>
  2768. <table class="directive">
  2769. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures the Server HTTP response
  2770. header</td></tr>
  2771. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full</code></td></tr>
  2772. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerTokens Full</code></td></tr>
  2773. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
  2774. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  2775. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  2776. </table>
  2777.     <p>This directive controls whether <code>Server</code> response
  2778.     header field which is sent back to clients includes a
  2779.     description of the generic OS-type of the server as well as
  2780.     information about compiled-in modules.</p>
  2781.  
  2782.     <dl>
  2783.       <dt><code>ServerTokens Prod[uctOnly]</code></dt>
  2784.  
  2785.       <dd>Server sends (<em>e.g.</em>): <code>Server:
  2786.       Apache</code></dd>
  2787.  
  2788.       <dt><code>ServerTokens Major</code></dt>
  2789.  
  2790.       <dd>Server sends (<em>e.g.</em>): <code>Server:
  2791.       Apache/2</code></dd>
  2792.  
  2793.       <dt><code>ServerTokens Minor</code></dt>
  2794.  
  2795.       <dd>Server sends (<em>e.g.</em>): <code>Server:
  2796.       Apache/2.0</code></dd>
  2797.  
  2798.       <dt><code>ServerTokens Min[imal]</code></dt>
  2799.  
  2800.       <dd>Server sends (<em>e.g.</em>): <code>Server:
  2801.       Apache/2.0.41</code></dd>
  2802.  
  2803.       <dt><code>ServerTokens OS</code></dt>
  2804.  
  2805.       <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.0.41
  2806.       (Unix)</code></dd>
  2807.  
  2808.       <dt><code>ServerTokens Full</code> (or not specified)</dt>
  2809.  
  2810.       <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.0.41
  2811.       (Unix) PHP/4.2.2 MyMod/1.2</code></dd>
  2812.     </dl>
  2813.  
  2814.     <p>This setting applies to the entire server, and cannot be
  2815.     enabled or disabled on a virtualhost-by-virtualhost basis.</p>
  2816.  
  2817.     <p>After version 2.0.44, this directive also controls the
  2818.     information presented by the <code class="directive"><a href="#serversignature">ServerSignature</a></code> directive.</p>
  2819.  
  2820. <h3>See also</h3>
  2821. <ul>
  2822. <li><code class="directive"><a href="#serversignature">ServerSignature</a></code></li>
  2823. </ul>
  2824. </div>
  2825. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  2826. <div class="directive-section"><h2><a name="SetHandler" id="SetHandler">SetHandler</a> <a name="sethandler" id="sethandler">Directive</a></h2>
  2827. <table class="directive">
  2828. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Forces all matching files to be processed by a
  2829. handler</td></tr>
  2830. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetHandler <var>handler-name</var>|None</code></td></tr>
  2831. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  2832. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
  2833. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  2834. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  2835. <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Moved into the core in Apache 2.0</td></tr>
  2836. </table>
  2837.     <p>When placed into an <code>.htaccess</code> file or a
  2838.     <code class="directive"><a href="#directory"><Directory></a></code> or
  2839.     <code class="directive"><a href="#location"><Location></a></code>
  2840.     section, this directive forces all matching files to be parsed
  2841.     through the <a href="../handler.html">handler</a> given by
  2842.     <var>handler-name</var>. For example, if you had a directory you
  2843.     wanted to be parsed entirely as imagemap rule files, regardless
  2844.     of extension, you might put the following into an
  2845.     <code>.htaccess</code> file in that directory:</p>
  2846.  
  2847.     <div class="example"><p><code>
  2848.       SetHandler imap-file
  2849.     </code></p></div>
  2850.  
  2851.     <p>Another example: if you wanted to have the server display a
  2852.     status report whenever a URL of
  2853.     <code>http://servername/status</code> was called, you might put
  2854.     the following into <code>httpd.conf</code>:</p>
  2855.  
  2856.     <div class="example"><p><code>
  2857.       <Location /status><br />
  2858.       <span class="indent">
  2859.         SetHandler server-status<br />
  2860.       </span>
  2861.       </Location>
  2862.     </code></p></div>
  2863.  
  2864.     <p>You can override an earlier defined <code class="directive">SetHandler</code>
  2865.     directive by using the value <code>None</code>.</p>
  2866.  
  2867. <h3>See also</h3>
  2868. <ul>
  2869. <li><code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code></li>
  2870. </ul>
  2871. </div>
  2872. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  2873. <div class="directive-section"><h2><a name="SetInputFilter" id="SetInputFilter">SetInputFilter</a> <a name="setinputfilter" id="setinputfilter">Directive</a></h2>
  2874. <table class="directive">
  2875. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the filters that will process client requests and POST
  2876. input</td></tr>
  2877. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetInputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr>
  2878. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  2879. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
  2880. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  2881. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  2882. </table>
  2883.     <p>The <code class="directive">SetInputFilter</code> directive sets the
  2884.     filter or filters which will process client requests and POST
  2885.     input when they are received by the server. This is in addition to
  2886.     any filters defined elsewhere, including the
  2887.     <code class="directive"><a href="../mod/mod_mime.html#addinputfilter">AddInputFilter</a></code>
  2888.     directive.</p>
  2889.  
  2890.     <p>If more than one filter is specified, they must be separated
  2891.     by semicolons in the order in which they should process the
  2892.     content.</p>
  2893.  
  2894. <h3>See also</h3>
  2895. <ul>
  2896. <li><a href="../filter.html">Filters</a> documentation</li>
  2897. </ul>
  2898. </div>
  2899. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  2900. <div class="directive-section"><h2><a name="SetOutputFilter" id="SetOutputFilter">SetOutputFilter</a> <a name="setoutputfilter" id="setoutputfilter">Directive</a></h2>
  2901. <table class="directive">
  2902. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the filters that will process responses from the
  2903. server</td></tr>
  2904. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetOutputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr>
  2905. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  2906. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
  2907. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  2908. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  2909. </table>
  2910.     <p>The <code class="directive">SetOutputFilter</code> directive sets the filters
  2911.     which will process responses from the server before they are
  2912.     sent to the client. This is in addition to any filters defined
  2913.     elsewhere, including the
  2914.     <code class="directive"><a href="../mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code>
  2915.     directive.</p>
  2916.  
  2917.     <p>For example, the following configuration will process all files
  2918.     in the <code>/www/data/</code> directory for server-side
  2919.     includes.</p>
  2920.  
  2921.     <div class="example"><p><code>
  2922.       <Directory /www/data/><br />
  2923.       <span class="indent">
  2924.         SetOutputFilter INCLUDES<br />
  2925.       </span>
  2926.       </Directory>
  2927.     </code></p></div>
  2928.  
  2929.     <p>If more than one filter is specified, they must be separated
  2930.     by semicolons in the order in which they should process the
  2931.     content.</p>
  2932.  
  2933. <h3>See also</h3>
  2934. <ul>
  2935. <li><a href="../filter.html">Filters</a> documentation</li>
  2936. </ul>
  2937. </div>
  2938. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  2939. <div class="directive-section"><h2><a name="TimeOut" id="TimeOut">TimeOut</a> <a name="timeout" id="timeout">Directive</a></h2>
  2940. <table class="directive">
  2941. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Amount of time the server will wait for
  2942. certain events before failing a request</td></tr>
  2943. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TimeOut <var>seconds</var></code></td></tr>
  2944. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TimeOut 300</code></td></tr>
  2945. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
  2946. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  2947. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  2948. </table>
  2949.     <p>The <code class="directive">TimeOut</code> directive currently defines
  2950.     the amount of time Apache will wait for three things:</p>
  2951.  
  2952.     <ol>
  2953.       <li>The total amount of time it takes to receive a GET
  2954.       request.</li>
  2955.  
  2956.       <li>The amount of time between receipt of TCP packets on a
  2957.       POST or PUT request.</li>
  2958.  
  2959.       <li>The amount of time between ACKs on transmissions of TCP
  2960.       packets in responses.</li>
  2961.     </ol>
  2962.  
  2963.     <p>We plan on making these separately configurable at some point
  2964.     down the road. The timer used to default to 1200 before 1.2,
  2965.     but has been lowered to 300 which is still far more than
  2966.     necessary in most situations. It is not set any lower by
  2967.     default because there may still be odd places in the code where
  2968.     the timer is not reset when a packet is sent. </p>
  2969.  
  2970. </div>
  2971. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  2972. <div class="directive-section"><h2><a name="UseCanonicalName" id="UseCanonicalName">UseCanonicalName</a> <a name="usecanonicalname" id="usecanonicalname">Directive</a></h2>
  2973. <table class="directive">
  2974. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures how the server determines its own name and
  2975. port</td></tr>
  2976. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UseCanonicalName On|Off|DNS</code></td></tr>
  2977. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>UseCanonicalName On</code></td></tr>
  2978. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
  2979. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  2980. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  2981. </table>
  2982.     <p>In many situations Apache must construct a <em>self-referential</em>
  2983.     URL -- that is, a URL that refers back to the same server. With
  2984.     <code>UseCanonicalName On</code> Apache will use the hostname and port
  2985.     specified in the <code class="directive"><a href="#servername">ServerName</a></code>
  2986.     directive to construct the canonical name for the server. This name
  2987.     is used in all self-referential URLs, and for the values of
  2988.     <code>SERVER_NAME</code> and <code>SERVER_PORT</code> in CGIs.</p>
  2989.  
  2990.     <p>With <code>UseCanonicalName Off</code> Apache will form
  2991.     self-referential URLs using the hostname and port supplied by
  2992.     the client if any are supplied (otherwise it will use the
  2993.     canonical name, as defined above). These values are the same
  2994.     that are used to implement <a href="../vhosts/name-based.html">name based virtual hosts</a>,
  2995.     and are available with the same clients. The CGI variables
  2996.     <code>SERVER_NAME</code> and <code>SERVER_PORT</code> will be
  2997.     constructed from the client supplied values as well.</p>
  2998.  
  2999.     <p>An example where this may be useful is on an intranet server
  3000.     where you have users connecting to the machine using short
  3001.     names such as <code>www</code>. You'll notice that if the users
  3002.     type a shortname, and a URL which is a directory, such as
  3003.     <code>http://www/splat</code>, <em>without the trailing
  3004.     slash</em> then Apache will redirect them to
  3005.     <code>http://www.domain.com/splat/</code>. If you have
  3006.     authentication enabled, this will cause the user to have to
  3007.     authenticate twice (once for <code>www</code> and once again
  3008.     for <code>www.domain.com</code> -- see <a href="http://httpd.apache.org/docs/misc/FAQ.html#prompted-twice">the
  3009.     FAQ on this subject for more information</a>). But if
  3010.     <code class="directive">UseCanonicalName</code> is set <code>Off</code>, then
  3011.     Apache will redirect to <code>http://www/splat/</code>.</p>
  3012.  
  3013.     <p>There is a third option, <code>UseCanonicalName DNS</code>,
  3014.     which is intended for use with mass IP-based virtual hosting to
  3015.     support ancient clients that do not provide a
  3016.     <code>Host:</code> header. With this option Apache does a
  3017.     reverse DNS lookup on the server IP address that the client
  3018.     connected to in order to work out self-referential URLs.</p>
  3019.  
  3020.     <div class="warning"><h3>Warning</h3>
  3021.     <p>If CGIs make assumptions about the values of <code>SERVER_NAME</code>
  3022.     they may be broken by this option. The client is essentially free
  3023.     to give whatever value they want as a hostname. But if the CGI is
  3024.     only using <code>SERVER_NAME</code> to construct self-referential URLs
  3025.     then it should be just fine.</p>
  3026.     </div>
  3027.  
  3028. <h3>See also</h3>
  3029. <ul>
  3030. <li><code class="directive"><a href="#servername">ServerName</a></code></li>
  3031. <li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li>
  3032. </ul>
  3033. </div>
  3034. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  3035. <div class="directive-section"><h2><a name="VirtualHost" id="VirtualHost"><VirtualHost></a> <a name="virtualhost" id="virtualhost">Directive</a></h2>
  3036. <table class="directive">
  3037. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only to a specific
  3038. hostname or IP address</td></tr>
  3039. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><VirtualHost
  3040.     <var>addr</var>[:<var>port</var>] [<var>addr</var>[:<var>port</var>]]
  3041.     ...> ... </VirtualHost></code></td></tr>
  3042. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
  3043. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
  3044. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
  3045. </table>
  3046.     <p><code class="directive"><VirtualHost></code> and
  3047.     <code></VirtualHost></code> are used to enclose a group of
  3048.     directives that will apply only to a particular virtual host. Any
  3049.     directive that is allowed in a virtual host context may be
  3050.     used. When the server receives a request for a document on a
  3051.     particular virtual host, it uses the configuration directives
  3052.     enclosed in the <code class="directive"><VirtualHost></code>
  3053.     section. <var>Addr</var> can be:</p>
  3054.  
  3055.     <ul>
  3056.       <li>The IP address of the virtual host;</li>
  3057.  
  3058.       <li>A fully qualified domain name for the IP address of the
  3059.       virtual host;</li>
  3060.  
  3061.       <li>The character <code>*</code>, which is used only in combination with
  3062.       <code>NameVirtualHost *</code> to match all IP addresses; or</li>
  3063.  
  3064.       <li>The string <code>_default_</code>, which is used only
  3065.       with IP virtual hosting to catch unmatched IP addresses.</li>
  3066.     </ul>
  3067.  
  3068.     <div class="example"><h3>Example</h3><p><code>
  3069.       <VirtualHost 10.1.2.3><br />
  3070.       <span class="indent">
  3071.         ServerAdmin webmaster@host.foo.com<br />
  3072.         DocumentRoot /www/docs/host.foo.com<br />
  3073.         ServerName host.foo.com<br />
  3074.         ErrorLog logs/host.foo.com-error_log<br />
  3075.         TransferLog logs/host.foo.com-access_log<br />
  3076.       </span>
  3077.       </VirtualHost>
  3078.     </code></p></div>
  3079.  
  3080.  
  3081.     <p>IPv6 addresses must be specified in square brackets because
  3082.     the optional port number could not be determined otherwise.  An
  3083.     IPv6 example is shown below:</p>
  3084.  
  3085.     <div class="example"><p><code>
  3086.       <VirtualHost [fe80::a00:20ff:fea7:ccea]><br />
  3087.       <span class="indent">
  3088.         ServerAdmin webmaster@host.example.com<br />
  3089.         DocumentRoot /www/docs/host.example.com<br />
  3090.         ServerName host.example.com<br />
  3091.         ErrorLog logs/host.example.com-error_log<br />
  3092.         TransferLog logs/host.example.com-access_log<br />
  3093.       </span>
  3094.       </VirtualHost>
  3095.     </code></p></div>
  3096.  
  3097.     <p>Each Virtual Host must correspond to a different IP address,
  3098.     different port number or a different host name for the server,
  3099.     in the former case the server machine must be configured to
  3100.     accept IP packets for multiple addresses. (If the machine does
  3101.     not have multiple network interfaces, then this can be
  3102.     accomplished with the <code>ifconfig alias</code> command -- if
  3103.     your OS supports it).</p>
  3104.  
  3105.     <div class="note"><h3>Note</h3>
  3106.     <p>The use of <code class="directive"><VirtualHost></code> does
  3107.     <strong>not</strong> affect what addresses Apache listens on. You
  3108.     may need to ensure that Apache is listening on the correct addresses
  3109.     using <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>.</p>
  3110.     </div>
  3111.  
  3112.     <p>When using IP-based virtual hosting, the special name
  3113.     <code>_default_</code> can be specified in
  3114.     which case this virtual host will match any IP address that is
  3115.     not explicitly listed in another virtual host. In the absence
  3116.     of any <code>_default_</code> virtual host the "main" server config,
  3117.     consisting of all those definitions outside any VirtualHost
  3118.     section, is used when no IP-match occurs.  (But note that any IP
  3119.     address that matches a <code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code> directive will use neither
  3120.     the "main" server config nor the <code>_default_</code> virtual host.
  3121.     See the <a href="../vhosts/name-based.html">name-based virtual hosting</a>
  3122.     documentation for further details.)</p>
  3123.  
  3124.     <p>You can specify a <code>:port</code> to change the port that is
  3125.     matched. If unspecified then it defaults to the same port as the
  3126.     most recent <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>
  3127.     statement of the main server. You may also specify <code>:*</code>
  3128.     to match all ports on that address. (This is recommended when used
  3129.     with <code>_default_</code>.)</p>
  3130.  
  3131.     <div class="warning"><h3>Security</h3>
  3132.     <p>See the <a href="../misc/security_tips.html">security tips</a>
  3133.     document for details on why your security could be compromised if the
  3134.     directory where logfiles are stored is writable by anyone other
  3135.     than the user that starts the server.</p>
  3136.     </div>
  3137.  
  3138. <h3>See also</h3>
  3139. <ul>
  3140. <li><a href="../vhosts/">Apache Virtual Host documentation</a></li>
  3141. <li><a href="../dns-caveats.html">Issues Regarding DNS and
  3142.     Apache</a></li>
  3143. <li><a href="../bind.html">Setting
  3144.     which addresses and ports Apache uses</a></li>
  3145. <li><a href="../sections.html">How <Directory>, <Location>
  3146.     and <Files> sections work</a> for an explanation of how these
  3147.     different sections are combined when a request is received</li>
  3148. </ul>
  3149. </div>
  3150. </div>
  3151. <div class="bottomlang">
  3152. <p><span>Available Languages: </span><a href="../de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> |
  3153. <a href="../en/mod/core.html" title="English"> en </a></p>
  3154. </div><div id="footer">
  3155. <p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</a></p>
  3156. <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
  3157. </body></html>